Ask Your Question
1

The simple p2os (pioneer) gazebo simulation example stopped working on electric

asked 2011-10-13 06:44:21 -0500

Markus Bader gravatar image

updated 2011-10-13 07:03:44 -0500

Hi

The simple p2os (pioneer) gazebo simulation example stopped working on electric. On dimamondback it was possible to simulate a pioneer robot by running:

roslaunch p2os_urdf pioneer3dx.gazebo.launch

and to control it by:

rosrun erratic_teleop erratic_keyboard_teleop

On electric it stopped working, rostopic showed me that there is no publisher for \cmd_vel. Weird is that the very similar example from the erratic robot works.

Had someone the same problem and maybe a solution?

I tried to debug the gazebo_plugin gazebo_ros_diffdrive (gazebo_ros_diffdrive.cpp ) and it stucked there on line 71 client->ConnectWait(serverId, GZ_CLIENT_ID_USER_FIRST);

Greetings Max

Tested on Ubuntu 10.04 32bit and 11.04 64bit

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2011-10-13 21:26:43 -0500

Markus Bader gravatar image

Thanks to VN!

It is working now! I rewrote controller part in the pioneer3dx.xacro and replaced

<controller:differential_position2d name="controller1">
  <update>100</update>
  <leftJoint>base_right_wheel_joint</leftJoint>
  <rightJoint>base_left_wheel_joint</rightJoint>
  <wheelSeparation>0.39</wheelSeparation>
  <wheelDiameter>0.15</wheelDiameter>
  <torque>5</torque>
  <interface:position name="position_iface_0"/>
</controller:differential_position2d>

with

<controller:diffdrive_plugin name="differential_drive_controller" plugin="libdiffdrive_plugin.so">
  <alwaysOn>true</alwaysOn>
  <update>100</update>
  <updateRate>100.0</updateRate>
  <leftJoint>base_right_wheel_joint</leftJoint>
  <rightJoint>base_left_wheel_joint</rightJoint>
  <wheelSeparation>0.39</wheelSeparation>
  <wheelDiameter>0.15</wheelDiameter>
  <torque>5</torque>
  <interface:position name="position_iface_0"/>
  <robotNamespace>/</robotNamespace>
  <topicName>cmd_vel</topicName>
</controller:diffdrive_plugin>

And there where also some changes needed to the launch file: The Controller Manager and the Controller Manager could be replaced by the Robot state publisher.

  <!-- Robot state publisher -->
  <node pkg="robot_state_publisher" type="state_publisher" name="robot_state_publisher">
    <param name="publish_frequency" type="double" value="50.0" />
    <param name="tf_prefix" type="string" value="" />
  </node>
edit flag offensive delete link more

Comments

Hi Markus: Just curious to know if you are able to use pioneer model (your modified urdf/xacro file) to simulate in gazebo using navigation stack without any odometry error?? looking forward to hear from you.
VN gravatar image VN  ( 2011-10-16 16:31:58 -0500 )edit

Can you share your setup? i am trying to setup similar simulation but couldnot do. problem : http://answers.ros.org/question/29759/p2os-gazebo-simulation-example-stopped-working-on

prince gravatar image prince  ( 2012-03-15 00:01:41 -0500 )edit
1

answered 2011-10-13 17:21:29 -0500

VN gravatar image

Markus: pioneer3dx.gazebo.launch file doesn't have transmissions for swivel and castor wheel. you have to modify it little bit. you should use "erratic robot" differential drive plugin.

edit flag offensive delete link more

Comments

Hi! Just wanted to let you know that your solution worked for me as well. I tested it on Fuerte running on Ubuntu 12.04 LTS 64 bit OS. However, I still have a small issue. The robot is little jumpy. I mean the robot castor wheel keeps vibrating.

swagatk gravatar image swagatk  ( 2013-03-26 01:44:16 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2011-10-13 06:44:21 -0500

Seen: 2,314 times

Last updated: Oct 13 '11