Gazebo | Ignition | Community
Ask Your Question

How to confige an official plugin in model file?

asked 2020-11-04 07:13:09 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Hi everyone! Now I was confuse about how to setting the parameters of some official plugin in model file(such as urdf,xacro,sdf...)

As the official tutorial has said,

Modify the end of the Load function to read the <velocity> using the sdf::ElementPtr parameter.

// Default to zero velocity
double velocity = 0;

// Check that the velocity element exists, then read the value
if (_sdf->HasElement("velocity"))
  velocity = _sdf->Get<double>("velocity");

// Set the joint's target velocity. This target velocity is just
// for demonstration purposes.
    this->joint->GetScopedName(), velocity);

Actually, I can only see the members of the class on the official documentation.

So, I was wondering how to get the parameter which is needed to confige the plugin? Like

<gazebo reference="your_link_name">
  <plugin name="your_link_laser_controller" filename="">
    ... plugin parameters ...

Thanks a lot!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-12-18 13:17:08 -0500

ahcorde gravatar image


you can have a look to the In particular these lines. You will be able to configure the plugin.


edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2020-11-04 07:13:09 -0500

Seen: 37 times

Last updated: Dec 18 '20