How to Use ControlIt! with stickbot_upperbody_10dof (Joint Position)

This section describes how to control the joint positions of stick_bot_upperbody_10dof.

Generate the URDFs

Note: One only needs to generate the URDFs again if the xacros from which the URDFs are derived have changed. If this is your first time running the demo or you are unsure if the xacros have changed, do not skip this step.

Generate the URDF description files:

$ roscd stickbot_upperbody_10dof_controlit/models
$ ./ 

Launch Automatically Using a Single Command

To run the demo using a single command:

$ reset && roslaunch stickbot_upperbody_10dof_controlit simulate_jpos.launch 

Launch Manually Using Multiple Commands

Start roscore.

$ roscore 

Start the shared memory manager:

$ rosrun shared_memory_interface shared_memory_manager

In a new terminal load the parameters onto the ROS parameter server:

$ roslaunch stickbot_upperbody_10dof load_stickbot_upperbody_10dof_params_jpos.launch 

The above command will exit after loading the parameters. Next start the simulation by executing the following command in the same terminal:

$ roslaunch stickbot_upperbody_10dof gazebo.launch 

You should now see Gazebo’s window with the robot loaded as shown below. The simulation will initially be stopped. Leave it this way for now.

Start the controller:

$ roslaunch stickbot_upperbody_10dof start_rapid_controller.launch 

The above command will start the RAPid controller and block. Hit play in Gazebo to start the demo.

Usage Notes

You can change the joint position reference by executing:

$ rostopic pub --once /stickbot_upperbody_10dof_controller/JPosTask/goalPosition std_msgs/Float64MultiArray '{layout: {dim: [{label: "x", size: 10, stride: 10}], data_offset: 0}, data: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]}' 

For example, to make the robot lean forward, execute:

$ rostopic pub --once /stickbot_upperbody_10dof_controller/JPosTask/goalPosition std_msgs/Float64MultiArray '{layout: {dim: [{label: "x", size: 10, stride: 10}], data_offset: 0}, data: [0.0, 0.5, -0.5, 1.0, -0.5, 0.0, -1.5, 2.0, 1.0, -1.0]}' 

Here is what you should see: