Note: This tutorial assumes that you have completed the previous tutorials: RSM Robot Setup. |
Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags. |
Run RSM
Description: Launch the Robot Statemachine for your robotTutorial Level: BEGINNER
Next Tutorial: Writing a Plugin State
Contents
Launch-file Parameters
The RSM's core functionality is distributed over several nodes that can simply be started with the launchfile rsm.launch which requires the following arguments:
update_frequency: The update rate in Hz of the RSM (default: 20)
robot_frame: The robot base frame (default: "base_footprint")
mapping_plugin: The plugin used for mapping (default: "rsm::MappingDummyState")
calculate_goal_plugin: The plugin used to calculate the next goal for exploration (default: "rsm::CalculateGoalState")
navigation_plugin: The plugin used for navigation (default: "rsm::NavigationState")
autonomy_cmd_vel_topic: The name of the command velocity topic for messages from exploration, waypoint following or simple goals (default: "/autonomy/cmd_vel")
teleoperation_cmd_vel_topic: The name of the command velocity topic for messages from teleoperation (default: "/teleoperation/cmd_vel")
cmd_vel_topic: The name of the command velocity topic that the motor controller interface subscribes to (default: "/cmd_vel)
teleoperation_idle_timer: Time in seconds without input from teleoperation that leads to a transition to Idle State (default: 0.5)
waypoint_routines: List of all plugins to be used as routines for waypoints (default: [])
exploration_goal_tolerance: Distance in all directions in meters that the robot's current position can differ from an exploration goal to still count it as reached (default: 0.05)
Exemplary Launch
The nodes can of course be started separately though it is easier to use the launch file. An exemplary launch from the package rsm_additions can be seen below:
<include file="$(find rsm_core)/launch/rsm.launch"> <arg name="update_frequency" value="20" /> <arg name="robot_frame" value="$(arg robot_frame)" /> <arg name="autonomy_cmd_vel_topic" value="$(arg autonomy_cmd_vel_topic)" /> <arg name="teleoperation_cmd_vel_topic" value="$(arg teleoperation_cmd_vel_topic)" /> <arg name="cmd_vel_topic" value="$(arg cmd_vel_topic)" /> <arg name="calculate_goal_plugin" value="$(arg goal_plugin)" /> <arg name="navigation_plugin" value="$(arg navigation_plugin)" /> <arg name="mapping_plugin" value="$(arg mapping_plugin)" /> <arg name="waypoint_routines" value="$(arg waypoint_routines)" /> <arg name="exploration_goal_tolerance" value="0.05" /> </include>