ROS /
InstallingTheScarabsROSPackagesOverviewScarab is a ground robot developed by Penn that runs ROS. These are instructions to install it on an Ubuntu 14.04 (ROS only runs on Ubuntu) and to download the Scarab simulation files. Berkeley
Install ROSIf you get stuck, see the end of this page for Problems and Solutions
Run the simulation to test itcopy the following launch files into <launch> <arg name="robot" default="scarab0" /> <arg name="map" default="/map" /> <arg name="odom" default="/odom_laser" /> <arg name="base_frame" default="base_link" /> <arg name="map_frame" default="map_hokuyo" /> <node name="map" pkg="map_server" type="map_server" output="screen" args="$(find scarab)/maps/levine-4.yaml" > <param name="frame_id" value="$(arg map_frame)" /> </node> <node name="kinematic_sim" pkg="kinematic_sim" type="kinematic_sim" output="screen" respawn="false"> <param name="publish_freq" value="10"/> <param name="pub_global_frame" value="true"/> <param name="base_frame_id" value="$(arg base_frame)"/> <param name="global_frame_id" value="$(arg map_frame)"/> <param name="noise_x_sd" value="0.0"/> <param name="noise_y_sd" value="0.0"/> <param name="noise_th_sd" value="0.0"/> <param name="num_agents" value="1"/> <param name="initial0" value="0.00 0.00 0.00"/> </node> <node name="laser" pkg="laser_simulator" type="laser_simulator" output="screen" respawn="false"> <param name="frame_id" value="$(arg robot)/$(arg base_frame)"/> <param name="offset/x" value="0.0"/> <param name="offset/y" value="0.0"/> <param name="offset/z" value="0.2"/> <param name="noise_sd" value="0.003"/> <rosparam file="$(find laser_simulator)/models/UTM_30.yaml" command="load" /> <rosparam file="$(find laser_simulator)/config/models.yaml" command="load" /> <remap from="~map" to="$(arg map)"/> <remap from="~odom" to="/$(arg robot)/gt_odom"/> <remap from="~scan" to="/scan" /> </node> </launch>
<launch> <arg name="robot" default="scarab0" /> <arg name="map" default="/map" /> <arg name="odom" default="/odom_laser" /> <arg name="base_frame" default="$(arg robot)/base_link" /> <arg name="map_frame" default="map_hokuyo" /> <node name="pose" pkg="hfn" type="tf_posestamped_node.py"> <param name="base_frame_id" value="$(arg base_frame)"/> <param name="map_frame_id" value="$(arg map_frame)"/> </node> <node name="hfn" pkg="hfn" type="hfn"> <param name="base_frame_id" value="$(arg base_frame)" /> <param name="map_frame_id" value="$(arg map_frame)" /> <param name="tau_1" value="1.0" /> <param name="tau_2" value="0.2" /> <!-- old and good --> <!-- <param name="tau_1" value="1.5" /> --> <!-- <param name="tau_2" value="0.3" /> --> <param name="cost_occ_prob" value="0.01" /> <param name="cost_occ_dist" value="0.15" /> <param name="max_occ_dist" value="0.5" /> <param name="lethal_occ_dist" value="0.35" /> <param name="v_opt" value="0.5" /> <param name="w_max" value="1.0" /> <!-- 0.0873 rad ~= 5 degrees --> <!-- <param name="goal_tolerance_ang" value="0.0873" /> --> <param name="goal_tolerance_ang" value="0.2" /> <param name="min_map_update" value="2.0" /> <param name="stuck_start" value="3.0" /> <remap from="odom" to="$(arg robot)/odom_motor" /> <remap from="map" to="$(arg map)" /> <param name="stop_on_preempt" value="false" /> <remap from="cmd_vel" to="$(arg robot)/cmd_vel" /> </node> <node name="goal_to_action" pkg="hfn" type="goal_to_action.py" /> </launch> Then run the following terminal commands. Make sure you run source .../scarab_ws/devel/setup.bash roscore roslaunch rosbridge_server rosbridge_websocket.launch roslaunch scarab simulation.launch roslaunch scarab hfn.launch rosrun rviz rviz You should now see the visualization program. On the toolbar click Panels > Displays. Then at the bottom select "Add" and on the "By topic" tab select "/map/Map". Also, make sure that "map_hokuyo" is selected for "Fixed Frame" under "Global Options" in rviz. Problems and solutionsReverse chronological order, most recent first rvis display is black in Ubuntu running on VMware FusionAnswer is from http://wiki.ros.org/rviz/Troubleshooting. The problem is hardware acceleration. Try export LIBGL_ALWAYS_SOFTWARE=1 rosrun rviz rviz Errors about missing transforms and what notMake sure to select "map_hokuyo" for "Fixed Frame" under "Global Options" in rviz. roslaunch scarab simulation.launchError about missing -frounding-math Here, the fix was to rerun: catkin_make -DCMAKE_BUILD_TYPE=RelWithDebInfo scarab/hfn/CMakeFiles/hfnlib.dir/src/hfn.cpp.o
[ 56%] Generating C++ code from scarab_msgs/MoveAction.msg [ 58%] Generating C++ code from scarab_msgs/MoveActionResult.msg make[2]: *** [scarab/hfn/CMakeFiles/hfnlib.dir/src/hfn.cpp.o] Error 1 make[1]: *** [scarab/hfn/CMakeFiles/hfnlib.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... [ 59%] Generating C++ code from scarab_msgs/MoveActionFeedback.msg [ 61%] Generating C++ code from scarab_msgs/MoveGoal.msg [ 61%] Built target scarab_msgs_generate_messages_cpp Linking CXX executable /home/ros/scarab_ws/devel/lib/tf_throttle/tf_throttle [ 61%] Built target tf_throttle Linking CXX shared library /home/ros/scarab_ws/devel/lib/libmatcher.so [ 61%] Built target matcher make: *** [all] Error 2 Invoking "make -j4 -l4" failed ros@swarmnuc001:~/scarab_ws$ Here, the fix was to rerun: catkin_make -DCMAKE_BUILD_TYPE=RelWithDebInfo /usr/share/cmake-2.8/Modules/FindCurses.cmake:159 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
-- +++ processing catkin package: 'scarab' -- ==> add_subdirectory(scarab/scarab) -- +++ processing catkin package: 'mesh80211s' -- ==> add_subdirectory(scarab/mesh80211s) -- Using these message generators: gencpp;genlisp;genpy -- mesh80211s: 2 messages, 0 services -- Found PkgConfig: /usr/bin/pkg-config (found version "0.26") -- checking for module 'libnl-1' -- package 'libnl-1' not found CMake Error at /usr/share/cmake-2.8/Modules/FindPkgConfig.cmake:283 (message): A required package was not found Call Stack (most recent call first): /usr/share/cmake-2.8/Modules/FindPkgConfig.cmake:337 (_pkg_check_modules_internal) scarab/mesh80211s/CMakeLists.txt:11 (pkg_check_modules) -- +++ processing catkin package: 'scarab_twist' -- ==> add_subdirectory(scarab/scarab_twist) CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108 (message): Could NOT find Curses (missing: CURSES_LIBRARY CURSES_INCLUDE_PATH) Call Stack (most recent call first): /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake-2.8/Modules/FindCurses.cmake:159 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) scarab/scarab_twist/CMakeLists.txt:5 (find_package) -- Configuring incomplete, errors occurred! See also "/home/ros/scarab_ws/build/CMakeFiles/CMakeOutput.log". See also "/home/ros/scarab_ws/build/CMakeFiles/CMakeError.log". Invoking "cmake" failed ros@swarmnuc001:~/scarab_ws$ I think the fix was that I had not done cd scarab git checkout bcharrow-devel Missing MoveAction.hThe fix was to not checkout bcharrow-devel and instead stay on master [#SeeAlso]] See Also |