PR2 Plugins

This package contains dynamic plugins for Gazebo and ROS integration with simulated hardware.

Please see gazebo_plugins for additional supported hardware components in simulation.

Gazebo XML Plugin Configuration



  • <robotParam> (string, default: "robot_description")

    • Name of ROS parameter where robot description is stored.

    <robotNamespace> (string, default: "/")

    • Robot namespace.


    <!-- GazeboMechanismControl -->
    <controller:gazebo_ros_controller_manager name="gazebo_ros_controller_manager" plugin="">


GazeboRosProsilica plugin provides ROS topic and service interfaces similar to those provided by the Prosilica Camera hardware on PR2.


  • <robotNamespace> (string, default: "/")

    • Robot namespace.

    <imageTopicName> (string, default: "image_raw")

    • ROS topic name for publishing image.

    <cameraInfoTopicName> (string, default: "camera_info")

    • ROS topic name for publishing camera info.

    <pollServiceName> (string, default: "request_image")

    • ROS service name for polling.

    <frameName> (string, default: "")

    • Frame name of camera.

    <CxPrime> (integer, default: 320)

    • CxPrime

    <Cx> (integer, default: 320)

    • Cx

    <Cy> (integer, default: 240)

    • Cy

    <focal_length> (double, default: 554.256)

    • image_width(px) / (2*tan( hfov(radian) /2))

    <distortion_k1> (double, default: 0)

    • Distortion k1 value.

    <distortion_k2> (double, default: 0)

    • Distortion k2 value.

    <distortion_k3> (double, default: 0)

    • Distortion k3 value.

    <distortion_t1> (double, default: 0)

    • Distortion t1 value.

    <distortion_t2> (double, default: 0)

    • Distortion t2 value.

    <hackBaseline> (double, default: 0)

    • Hack for right stereo camera


  <body:empty name="camera_body_name">
    <sensor:camera name="high_def_sensor">
      <imageSize>2448 2050</imageSize>
      <controller:gazebo_ros_prosilica name="high_def_controller" plugin="">
        <focal_length>2955</focal_length> <!-- image_width / (2*tan(hfov_radian /2)) -->
        <interface:camera name="high_def_iface"/>


GazeboRosPowerNode plugin provides ROS topics and services similar to those provided by PR2 power monitor node on physical PR2.


  • <robotNamespace> (string, default: "/")

    • Robot namespace

    <powerStateTopic> (string, default: "power_state")

    • Topic to subscribe to power state on

    <powerStateRate> (double, default: 1.0)

    • Power state rate.

    <fullChargeCapacity> (double, default: 80.0)

    • Full charge capacity

    <chargeRate> (double, default: 500.0)

    • Charge rate

    <dischargeVoltage> (double, default: 16.0)

    • Discharge voltate

    <dischargeRate> (double, default: -500.0)

    • Discharge rate

    <chargeVoltage> (double, default: 16.0)

    • Charge voltage.


    <controller:gazebo_ros_power_monitor name="gazebo_ros_power_monitor_controller" plugin="">
        <interface:audio name="power_monitor_dummy_interface" />



Gazebo plugin for simulating the PR2 power monitor.

Subscribed Topics

plugged_in (pr2_gazebo_plugins/PlugCommand)
  • plugged in state

Published Topics

<powerStateTopic> (pr2_msgs/PowerState)
  • simulated power state


Gazebo plugin for simulating the prosilica camera. This follows the standard ROS API for camera drivers.

Published Topics

<imageTopicName> (sensor_msgs/Image)
  • Camera image
<cameraInfoTopicName> (sensor_msgs/CameraInfo)
  • Camera info


request_image (polled_camera/GetPolledImage)
  • (Polled Mode Only) Captures an image and publishes it in the namespace specified by the request message. Returns the timestamp.


GazeboRosControllerManager plugin provides similar ROS interface as pr2_etherCAT on the physical PR2 robot. This plugin is written in a way that PR2 controller manager works transparently with either this simulated plugin or the pr2_etherCAT hardware. For more information on using generic controllers or PR2 specific controllers with this plugin, please see pr2_controller_manager.



This stack will be updated with new features as the PR2 hardware itself is updated. Future versions will also incorporate dynamic_reconfigure options to match ORS driver functionality.

Wiki: pr2_gazebo_plugins (last edited 2012-11-30 17:40:30 by hsu)