Last active
February 3, 2017 09:04
-
-
Save RyodoTanaka/8a9e0f49870a877611310e24d74b44c8 to your computer and use it in GitHub Desktop.
Gazebo + ROS で自分だけのロボットをつくる 7. 実際にlaunchしてみる ref: http://qiita.com/RyodoTanaka/items/af834ed767589a02e27a
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fourth_robot: | |
joint_state_controller: | |
type: joint_state_controller/JointStateController | |
publish_rate: 50 | |
diff_drive_controller: | |
type : "diff_drive_controller/DiffDriveController" | |
left_wheel : 'left_wheel_joint' | |
right_wheel : 'right_wheel_joint' | |
publish_rate: 25.0 # default: 50 | |
pose_covariance_diagonal : [0.001, 0.001, 1000000.0, 1000000.0, 1000000.0, 1000.0] | |
twist_covariance_diagonal: [0.001, 0.001, 1000000.0, 1000000.0, 1000000.0, 1000.0] | |
# Wheel separation and diameter. These are both optional. | |
# diff_drive_controller will attempt to read either one or both from the | |
# URDF if not specified as a parameter | |
wheel_separation : 0.43515 | |
wheel_radius : 0.032 | |
# Wheel separation and radius multipliers | |
wheel_separation_multiplier: 1.0 # default: 1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- these are the arguments you can pass this launch file, for example paused:=true --> | |
<arg name="model" default="$(find fourth_robot_description)/robots/fourth_robot.urdf.xacro"/> | |
<arg name="paused" default="false"/> | |
<arg name="use_sim_time" default="true"/> | |
<arg name="gui" default="true"/> | |
<arg name="headless" default="false"/> | |
<arg name="debug" default="false"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- We resume the logic in empty_world.launch, changing only the name of the world to be launched --> | |
<include file="$(find gazebo_ros)/launch/empty_world.launch"> | |
<arg name="world_name" value="$(find fourth_robot_gazebo)/worlds/clearpath_playpen.world"/> | |
<arg name="debug" value="$(arg debug)" /> | |
<arg name="gui" value="$(arg gui)" /> | |
<arg name="paused" value="$(arg paused)"/> | |
<arg name="use_sim_time" value="$(arg use_sim_time)"/> | |
<arg name="headless" value="$(arg headless)"/> | |
</include> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Load the URDF into the ROS Parameter Server --> | |
<param name="robot_description" | |
command="$(find xacro)/xacro.py '$(arg model)'" /> | |
<!-- Run a python script to the send a service call to gazebo_ros to spawn a URDF robot --> | |
<node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model" respawn="false" output="screen" | |
args="-urdf -model fourth_robot -param robot_description"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- ros_control motoman launch file --> | |
<include file="$(find fourth_robot_control)/launch/fourth_robot_control.launch"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Load joint controller configurations from YAML file to parameter server --> | |
<rosparam file="$(find fourth_robot_control)/config/controller.yaml" command="load"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- load the controllers --> | |
<node name="controller_spawner" pkg="controller_manager" | |
type="spawner" output="screen" | |
args="joint_state_controller | |
diff_drive_controller"> | |
</node> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- convert joint states to TF transforms for rviz, etc --> | |
<node name="robot_state_publisher" pkg="robot_state_publisher" | |
type="robot_state_publisher" | |
respawn="false" output="screen"> | |
</node> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<launch> | |
<!-- Load joint controller configurations from YAML file to parameter server --> | |
<rosparam file="$(find fourth_robot_control)/config/controller.yaml" command="load"/> | |
<!-- load the controllers --> | |
<node name="controller_spawner" pkg="controller_manager" | |
type="spawner" output="screen" | |
args="joint_state_controller | |
diff_drive_controller"> | |
</node> | |
<!-- convert joint states to TF transforms for rviz, etc --> | |
<node name="robot_state_publisher" pkg="robot_state_publisher" | |
type="robot_state_publisher" | |
respawn="false" output="screen"> | |
</node> | |
</launch> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<launch> | |
<!-- these are the arguments you can pass this launch file, for example paused:=true --> | |
<arg name="model" default="$(find fourth_robot_description)/robots/fourth_robot.urdf.xacro"/> | |
<arg name="paused" default="false"/> | |
<arg name="use_sim_time" default="true"/> | |
<arg name="gui" default="true"/> | |
<arg name="headless" default="false"/> | |
<arg name="debug" default="false"/> | |
<!-- We resume the logic in empty_world.launch, changing only the name of the world to be launched --> | |
<include file="$(find gazebo_ros)/launch/empty_world.launch"> | |
<arg name="world_name" value="$(find fourth_robot_gazebo)/worlds/clearpath_playpen.world"/> | |
<arg name="debug" value="$(arg debug)" /> | |
<arg name="gui" value="$(arg gui)" /> | |
<arg name="paused" value="$(arg paused)"/> | |
<arg name="use_sim_time" value="$(arg use_sim_time)"/> | |
<arg name="headless" value="$(arg headless)"/> | |
</include> | |
<!-- lrf merger --> | |
<include file="$(find fourth_robot_bringup)/launch/sensors/lrf_merger.launch"/> | |
<!-- Load the URDF into the ROS Parameter Server --> | |
<param name="robot_description" | |
command="$(find xacro)/xacro.py '$(arg model)'" /> | |
<!-- Run a python script to the send a service call to gazebo_ros to spawn a URDF robot --> | |
<node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model" respawn="false" output="screen" | |
args="-urdf -model fourth_robot -param robot_description"/> | |
<!-- ros_control motoman launch file --> | |
<include file="$(find fourth_robot_control)/launch/fourth_robot_control.launch"/> | |
</launch> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment