Running the Pioneer 3DX in Gazebo and ROS Kinetic (Part I)

The Pioneer P3-DX is a popular differential drive robot used in robotics research. With the capability of running for 8-10 hours, payload capability of 17kg and a flat surface to mount accessories like arms, cameras and LIDAR, it fits most basic mobility requirements.You can check out its data sheet here.

P3dxLidar.png           p3dxspeech.png    p3dxmanipulation.png

Unlike the Pioneer 2DX and 3AT which are included in the list of models maintained by the OSRF, and can be easily imported into the world, the 3DX must be acquired separately.

Though there exist multiple repositories hosting it, the simplest way to acquire it may be via running the Multi Robot Scenario example. The multi-robot scenario example imports two 3DX models, fitted with cameras and laser range finders, into the world.


Note: Even if you end up using any of the linked repositories, you may still face the bug listed below.


Its folder can be found at

/opt/ros/kinetic/share/gazebo_plugins/test/

…if you would want to modify it later.
However, you can run it by pasting this in the terminal

roslaunch  $(rospack find gazebo_plugins)/test/multi_robot_scenario/launch/multi_robot_scenario.launch

Note: If it is not found, you may need to source the setup.bash file located in the development folder of your catkin workspace. Copy (including the dot)

 .  ~/ROS/catkin_ws/devel/setup.bash

When using ROS Kinetic, you may have this error

Error [Param.cc:452] Unable to set value [-nan -nan -nan] for key[size]
gzclient: /build/ogre-1.9-mqY1wq/ogre-1.9-1.9.0+dfsg1/OgreMain/src/OgreNode.cpp:630: virtual void Ogre::Node::setScale(const Ogre::Vector3&): Assertion `!inScale.isNaN() && "Invalid vector supplied as parameter"' failed.
Aborted (core dumped)

Apparently, this is because of some collision geometries having parameters of zero. Thankfully, the fix is quite simple, and that is to make the collision geometries non-zero values.

Since you would want realistic collision geometry,  you may want to select reasonable sizes that fit the items you’re covering…or you could go with a default of 0.01.
So replace

<collision>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <box size="0 0 0"/>
      </geometry>
    </collision>

with

<collision>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <box size="0.1 0.1 0.1"/>
      </geometry>
    </collision>

Since the issue occurs with the size of the box geometry, you can search for “box” in the following files for replacement

/opt/ros/kinetic/share/gazebo_plugins/test/multi_robot_scenario/xacro/p3dx/ 
- pioneer3dx_wheel.xacro
- pioneer3dx_sonar.xacro
- pioneer3dx_swivel.xacro

After this you should be able to run

roslaunch  $(rospack find gazebo_plugins)/test/multi_robot_scenario/launch/multi_robot_scenario.launch

without issues.

Here is a photo of the result.

MultiRobotScenario.png

In this image, I had commented out the laser range finder and camera from the pioneer3dx.xacro file in

/opt/ros/kinetic/share/gazebo_plugins/test/multi_robot_scenario/xacro/p3dx/
Advertisements

1 Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s