Tutorials/drcsim/2.2/VRC Plugin Golf Cart With Atlas


 * 1) DRC Tutorial: Using the VRC plugin to put Atlas in the Golf Cart

This tutorial will demonstrate how to automatically place the Atlas robot in the driver's seat of the Golf Cart using ROS topics provided by the VRC Plugin. Note that this is a development aid provided for testing and will not be available during the competition. In the course of this tutorial, we're going to automatically cause Atlas to enter and exit the Golf Cart, which can be used to test perception while driving and manipulation of the vehicle controls.


 * 1) Install DRC Simulator ##

Click to see the instructions for installing the DRC simulator and associated utilities. This tutorial requires drcsim-2.2.


 * 1) Launch the DRC Simulator ##

Launch the simulator using the `atlas_golf_cart_fire_hose.launch`

roslaunch atlas_utils atlas_golf_cart_fire_hose.launch


 * 1) Place the Atlas robot near the vehicle ##

The VRC plugin exposes ROS topics for entering and exiting the vehicle. Currently, these topics can be invoked from anywhere in the world, but that is subject to change in future versions of drcsim. These topics are named:

/drc_world/robot_enter_car /drc_world/robot_exit_car

The topics take a pose message as an offset from the default positions relative to the vehicle. Be sure to wait at least 10 seconds after starting the simulation so Atlas can be unpinned (you will see the robot start swaying a little bit), or internal pin joints will fight against each other. To place the Atlas robot outside the driver's side door, use the robot_exit_car topic with an identity pose (note that the orientation is specified as a quaternion):

rostopic pub --once /drc_world/robot_exit_car geometry_msgs/Pose '{}'

To place the robot on the passenger's side of the golf cart facing the vehicle:

rostopic pub --once /drc_world/robot_exit_car geometry_msgs/Pose \ '{position: {x: 0.5, y: -3.5}, orientation: {w: 0.707, z: 0.707}}'

Be careful to wait several seconds between the publishing of the robot_exit_car messages, or the simulated joints used to teleport the robot may not have time to deactivate, causing strange behavior.


 * 1) Place the Atlas robot in the vehicle ##

Place Atlas in the driver's seat with the robot_enter_car topic (note that a position offset is required to place the vehicle correctly in the golf cart):

rostopic pub --once /drc_world/robot_enter_car geometry_msgs/Pose '{position: {x: 0.58, y: 0.2, z: 0.01}}'

Place Atlas in the passenger's seat by specifying a pose offset:

rostopic pub --once /drc_world/robot_enter_car geometry_msgs/Pose \ '{position: {x: 0.58, y: -0.8, z: 0.01}}'

Please note that the VRC plugin uses a fixed joint to place Atlas in the car. If you Reset Model Poses or use the Move or Translate tools on either model, while the joint is in place, the joint constraint will be violated and cause strange things to happen. You will likely have to restart the simulation.


 * 1) Test perception with Atlas in the vehicle ##

With Atlas placed in the vehicle, you can use the methods described in another tutorial to drive the vehicle using open-loop commands. This will allow testing of Atlas's perception systems while driving in the vehicle.

Disengage the hand brake:

rostopic pub --once /golf_cart/hand_brake/cmd std_msgs/Float64 '{ data : 0 }'

Turn the steering wheel:

rostopic pub --once /golf_cart/hand_wheel/cmd std_msgs/Float64 '{ data : 3.14 }'

Press the gas pedal:

rostopic pub --once /golf_cart/gas_pedal/cmd std_msgs/Float64 '{ data : 1 }'

Now the Golf Cart should be driving with Atlas in the passenger's seat. As described a tutorial on using rviz and a  tutorial on the MultiSense head, you can use rviz to view the camera or laser scan data while driving.


 * 1) Use Atlas robot's foot to press gas pedal ##

This section is under construction.


 * 1) Next ##

Next: Using the VRC plugin with the DRC Vehicle