0
$\begingroup$

Rosanswers logo

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


Originally posted by Markus Bader on ROS Answers with karma: 847 on 2011-10-13

Post score: 1

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

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.


Originally posted by VN with karma: 373 on 2011-10-13

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by swagatk on 2013-03-26:
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.

$\endgroup$
0
$\begingroup$

Rosanswers logo

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>

Originally posted by Markus Bader with karma: 847 on 2011-10-13

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by VN on 2011-10-16:
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.

Comment by prince on 2012-03-15:
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

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.