Gazebo | Ignition | Community
Ask Your Question
0

ERROR while loading world with DiffDrivePlugin as model plugin [closed]

asked 2015-12-16 10:19:55 -0500

Anand George gravatar image

updated 2015-12-16 11:46:25 -0500

Hi there,

I'm trying to control a Pioneer2dx with DiffDrivePlugin. Whenever I start the server, an error occurs. I got the plugin from here. No errors are coming while complilng.
Error:
Error [Element.cc:671] Missing element description for [left_joint]
gzserver: /usr/include/boost/smart_ptr/shared_ptr.hpp:648: typename boost::detail::sp_member_access<t>::type boost::shared_ptr<t>::operator->() const [with T = sdf::Element; typename boost::detail::sp_member_access<t>::type = sdf::Element*]: Assertion `px != 0' failed.
Aborted


What is this error and why this is coming? Can anyone provide me a solution?

Thanks in advance!

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Anand George
close date 2015-12-16 22:51:38.354443

Comments

Can you post your world file, the command you are using to run gazebo, and the version of gazebo you are using?

nkoenig gravatar imagenkoenig ( 2015-12-16 10:48:24 -0500 )edit

Here is the world file: http://pastebin.com/q4urVZKq ; Gazebo version 6.1.0 ; command: gzserver -u test.world

Anand George gravatar imageAnand George ( 2015-12-16 11:04:47 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-12-16 11:09:35 -0500

nkoenig gravatar image

You'll have to tell the diffdrive plugin about the joints in the model that the plugin should control. Here is an example:

<include>
  <uri>model://pioneer2dx</uri>
  <plugin name="DiffDrivePlugin" filename="build/libDiffDrivePlugin.so">
    <left_joint>pioneer2dx::left_wheel_hinge</left_joint>
    <right_joint>pioneer2dx::right_wheel_hinge</right_joint>
  </plugin>
</include>
edit flag offensive delete link more

Comments

Still the same error is coming.

Anand George gravatar imageAnand George ( 2015-12-16 11:28:24 -0500 )edit
nkoenig gravatar imagenkoenig ( 2015-12-16 11:35:29 -0500 )edit

So, I don't have to attach the plugin to the model. Therefore by publishing the required data to the topic ~/vel_cmd, canI control the robot? What data I have to publish?

Anand George gravatar imageAnand George ( 2015-12-16 11:49:38 -0500 )edit

You should be able to. You can find out the type of message by using `gz topic -i /gazebo/default/vel_cmd`

nkoenig gravatar imagenkoenig ( 2015-12-16 11:58:50 -0500 )edit

It worked! Is there any method to move the robot to a location in the plane by specifying the coordinates?

Anand George gravatar imageAnand George ( 2015-12-16 12:04:17 -0500 )edit

There is no built in method. You'll have to handle that computation yourself.

nkoenig gravatar imagenkoenig ( 2015-12-16 12:06:19 -0500 )edit

Okay thanks!!

Anand George gravatar imageAnand George ( 2015-12-16 12:11:52 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2015-12-16 10:19:55 -0500

Seen: 1,159 times

Last updated: Dec 16 '15