Note: If you plan on using the plugins for ROS navigation provided in the RSM additions package, you need to follow the navigation stack robot setup tutorial.. This tutorial assumes that you have completed the previous tutorials: GUI Introduction.
(!) 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.

RSM Robot Setup

Description: Required steps to setup a mobile robot to use the Robot Statemachine for exploration and waypoint following.

Tutorial Level: BEGINNER

Next Tutorial: Run RSM

General Setup

Setting up a robot for the basic RSM usage is fairly straightforward since it only requires setting up a robot motor controller interface that subscribes to command velocity messages of type geometry_msgs/Twist and generates actual motor commands from them.

A service provider to tell the Boot State that the boot is finished is also required. This should ideally check if all necessary systems on your robot are up and running. The service provider needs to offer a service of type std_srvs/SetBool under the name "rsm/bootUpFinished". The following code snippet shows a rudimentary sample implementation in a node:

   1 #include "ros/ros.h"
   2 #include "std_srvs/SetBool.h"
   3 
   4 bool boot_finished = false;
   5 
   6 bool bootUpService(std_srvs::SetBool::Request &req,
   7                 std_srvs::SetBool::Response &res) {
   8         if (boot_finished) {
   9                 res.success = 1;
  10                 res.message = "Finished";
  11         } else {
  12                 res.success = false;
  13                 res.message = "Still booting ...";
  14         }
  15         return true;
  16 }
  17 
  18 int main(int argc, char **argv) {
  19         ros::init(argc, argv, "bootUpNode");
  20         ros::NodeHandle nh("rsm");
  21         ros::ServiceServer bootup_service = nh.advertiseService("bootUpFinished",
  22                         bootUpService);
  23         //checking boot process and setting boot_finished to true if finished
  24         ros::spin();
  25         return 0;
  26 }

If this is not possible or necessary for your configuration, you can just launch the bootUpNode from the RSM additions package that sets up the service provider and returns a successful boot message after default 1 second. The delay can be set using the parameter wait_time.

Plugin Dependent Setup

The setup for navigating to set goals and executing mapping behaviors or routines depends on the defined plugins and can therefore not generally be declared.

In general, a tool for navigation, a tool for mapping and a tool for exploration are necessary to fully exploit the robot RSM. This includes at least one sensor for sensing the environment, creating a 2D or 3D map and running SLAM. When provided with the particular exploration and navigation plugins, the RSM will work for 3D maps.

Wiki: robot_statemachine/Tutorials/RSMRobotSetup (last edited 2019-09-13 13:14:36 by MarcoSteinbrink)