PepperFSMController
August 18, 2020 ยท View on GitHub
This is a base mc_rtc FSM (finite-state machine) controller for Pepper humanoid robot.
The goal of this controller is to gather all Pepper robot specific controller elements that are very likely to be used by any mc_rtc FSM controller with Pepper as a MainRobot.
This way users writing mc_rtc controller for Pepper do not need to add these elements again every time, but can use this controller as a starting point and a basic example.

If you need to create a new mc_rtc controller that uses Peppper as a MainRobot, it is highly recommended to use this repository as a starting point for your project. You can either fork this repository or duplicate it by making a bare clone then pushing it to your repository:
git clone --bare https://github.com/jrl-umi3218/pepper-fsm-controller PepperFSMController
cd PepperFSMController.git
git push --mirror https://github.com/your_account/your_repository.git
cd ..
$ rm -rf PepperFSMController.git
Required packages
List of Pepper specific controller elements:
- BoundedAccelerationConstr - acceleration bounds for mobile base
- CoMRelativeBodyTask - for defining CoM (center of mass) target wrt mobile base frame
- dynamicsConstraint - with modified torque limits for mobile base actuation
- uprightStanding - posture target
- mobileBaseTask - high weight mobile base position task (must be always in solver)
- comPlot (bool true/false) - option to add CoM projection plot
- Pepper device check - check if
Speakers,TabletandBumperdevices are available on therobot() - Mobile base log entries - added log entries about mobile base state (
base_q,base_alpha,base_alphaD,base_tau)
List of FSM states
Besides the default mc_rtc FSM states (such as HalfSitting, Pause_1s, Pause_5s etc.) this base controller includes following basic states:
- StandStraight - upright Pepper posture
- HandTaskStateLeft - left end-effector task
- HandTaskStateRight - right end-effector task
- HandTaskStateBoth - state with end-effector tasks for both end-effectors
- Wait - pause for 10s
Building and installing the controller
cd PepperFSMController # navigate to controller root directory
mkdir build # create build directory
cd build # enter build directory
cmake .. # compile controller
make
sudo make install # install controller once successfully compiled
Running the controller
Use your preferred interface to run this controller. Some option are:
Make sure to setup correctly following interface configuration entries:
# What robot is being controlled
MainRobot: Pepper
# Enabled controllers
Enabled: PepperFSMController
Visualizing the controller in RViz
To visualize controller state in RViz, you will first need to ensure that you have ROS installed and mc_rtc built with ROS support.
Run roslaunch launch/display.launch], using display.launch file provided in this repository, to launch controller display RViz node.
Once RViz node is started, configure it by clicking in RViz File -> Open Config -> select file mc_pepper_fsm_display.rviz, provided in launch folder in this repository
Add RViz configuration to ROS path
Optionally, you can configure RViz to use mc_pepper_fsm_display.rviz configuration automatically when running roslaunch launch/display.launch by adding it to your ROS path:
cp launch/mc_pepper_fsm_display.rviz ~/.ros/
Acknowledgment
Thanks to @gergondet and @arntanguy for reviewing and helping with this controller and the mc_rtc framework