Skip to content

Instantly share code, notes, and snippets.

@Ripley6811
Created August 10, 2017 10:57
Show Gist options
  • Select an option

  • Save Ripley6811/8b682439fa1e6c46280ed75d964ec9f3 to your computer and use it in GitHub Desktop.

Select an option

Save Ripley6811/8b682439fa1e6c46280ed75d964ec9f3 to your computer and use it in GitHub Desktop.
Test world number set in the first arg line.
<launch>
<!--TODO:Change the test number based on the scene you want loaded-->
<arg name="test_scene_num" value="1"/>
<!--Include description and control launch files-->
<include file="$(find pr2_robot)/launch/robot_description.launch"/>
<include file="$(find pr2_robot)/launch/robot_control.launch"/>
<include file="$(find pr2_moveit)/launch/move_group.launch"/>
<rosparam command="load" file="$(find pr2_moveit)/config/grasp.yaml"/>
<rosparam command="load" file="$(find pr2_robot)/config/dropbox.yaml"/>
<!--Launch a gazebo world-->
<include file="$(find gazebo_ros)/launch/empty_world.launch">
<!--TODO:Change the world name to load different tabletop setup-->
<arg name="world_name" value="$(find pr2_robot)/worlds/test$(arg test_scene_num).world"/>
<arg name="use_sim_time" value="true"/>
<arg name="paused" value="false"/>
<arg name="gui" value="true"/>
<arg name="headless" value="false"/>
<arg name="debug" value="false"/>
</include>
<!--spawn a robot in gazebo world-->
<node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model" respawn="false"
output="screen" args="-urdf -param robot_description
-x 0 -y -0 -z 0 -R 0 -P 0 -Y 0 -model pr2 "/>
<!--PR2 motion node-->
<node name="pr2_grasp_server" pkg="pr2_robot" type="grasp_server.py"
respawn="false" output="screen"/>
<node name="pr2_cloud_transformer" pkg="pr2_robot" type="pr2_cloud_transformer"
respawn="false" output="screen">
<param name="demo" type="bool" value="false"/>
</node>
<node name="pr2_pick_place_server" pkg="pr2_robot" type="pr2_pick_place_server"
respawn="false" output="screen"/>
<!--add test number and corresponding pick-list to rosparams-->
<param name="test_scene_num" type="int" value="$(arg test_scene_num)"/>
<rosparam command="load" file="$(find pr2_robot)/config/pick_list_$(arg test_scene_num).yaml"/>
<!--launch rviz-->
<node name="$(anon rviz)" pkg="rviz" type="rviz" respawn="false"
output="screen" args="-d $(find pr2_robot)/config/pr2.rviz"/>
<!-- The feature extractor node -->
<node name="feature_extractor" pkg="sensor_stick" type="feature_extractor" respawn="false"/>
</launch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment