sm_dance_bot_strikes_back

The dance_bot_strikes_back package

README

State Machine Diagram

! New Image required

Description

A full-featured state machine example, that highlights the capabilities of SMACC2, ROS2 & Nav2 via the Nav2z Client. In the original sm_dance_bot_strikes_back state machine, the variables that controlled the movements of the robot were entirely static, but in this example we made them dynamic, in that the robot uses a lidar sensor to find the range of the wall in front of it, then moves forward that value minus some margin. This also shows the "Orthogonal Read-Write Cycle" where we are reading data from one orthogonal (in this case the lidar client, "cl_lidar" is inside the obstacle perception orthogonal "or_obstacle_perception" and writes via the client "cl_nav2z" in the navigation orthogonal "or_navigation".

Doxygen Namespace & Class Reference

! Updated video url required To see a video of this state machine in action click here.

Build Instructions

First, source your chosen ros2 distro.

source /opt/ros/rolling/setup.bash
source /opt/ros/galactic/setup.bash

Before you build, make sure you’ve installed all the dependencies…

rosdep install --ignore-src --from-paths src -y -r

Then build with colcon build…

colcon build

Operating Instructions

After you build, remember to source the proper install folder...
source ~/colcon_ws/install/setup.bash

And then run the launch file…

ros2 launch sm_dance_bot_strikes_back sm_dance_bot_strikes_back_launch.py

Viewer Instructions

If you have the SMACC2 Runtime Analyzer installed then type...
ros2 run smacc2_rta smacc2_rta

If you don’t have the SMACC2 Runtime Analyzer click here.