ControlIt! Shared Memory Gazebo Plugin Documentation

Original Author: Chien-Liang Fok

Introduction

This page contains documentation for ControlIt!'s Gazebo plugin that enables ControlIt! to communicate with a simulated robot over shared memory.

Parameters

The following parameters are accessed from the ROS parameter server:

Parameter Description
/[namespace]/ControlItSMGazeboPlugin/JointOrder A list of joint names specifying which joints are under SM control and their order within the shared memory.
/[namespace]/ControlItSMGazeboPlugin/UnactuatedJoints A list of joint names specifying which joints are not actuatable.  This is useful when certain joints are slave joints of other joints, like Dreamer's torso joint 2.
/[namespace]/odometry_topic Specifies the topic on which odometry information should be transmitted.

Compile Instructions

To compile the plugin, execute:

$ rosmake hcrl_gazebo_plugins

Implementation

Source Code

The implementation is located in /[worskspace]/hcrl_robot_controlit_configs/hcrl_gazebo_plugins/gazebo_plugins/src/SMControlPlugin.cpp

Variables

Name Type Description
joint_index_sm_to_gazebo_map std::vector<size_t> Index by shared memory location.  Maps the index of the joint within shared memory to the index of the joint in Gazebo.
unactuated_joint_mask std::vector<size_t> Indexed by Gazebo joint order.  Contains a 1 if the joint is unactuated, and 0 otherwise.

Shared Memory Topics

The following shared memory topics are used by the plugin:

Name Type Direction Description
/rtt_rx std_msgs::Int64 Output Holds the reflected RTT sequence number.  This is used for measuring the round trip communication latency.
/joint_state sensor_msgs::JointState Output Holds the current joint state (position, velocity, torque)
[odometry topic] nav_msgs::Odometry Output Holds the current odometry information. This is the position and orientation of the root link of the model in the world. The topic is specified by the /[namespace]/odometry_topic ROS parameter and defaults to /gazebo/root_link_odom.
/rtt_tx std_msgs::Int64 Input Holds the RTT sequence number sent from the controller.  This plugin reflects this value in rtt_rx.
/cmd std_msgs::Float64MultiArray Input Holds the effort command issued by the controller (this should be generalized to hold a JointState message to enable desired positions and velocities to also be transmitted).