gazebo-yarp-plugins
Gazebo Plugins exposing YARP interfaces.
Loading...
Searching...
No Matches
yarp::dev::GazeboYarpBaseStateDriver Class Reference

YARP device driver to give the gazebo state information of a desired base link of the robot The state information include. More...

#include <BaseStateDriver.h>

Inheritance diagram for yarp::dev::GazeboYarpBaseStateDriver:
Collaboration diagram for yarp::dev::GazeboYarpBaseStateDriver:

Public Member Functions

 GazeboYarpBaseStateDriver ()
 
virtual ~GazeboYarpBaseStateDriver ()
 
virtual bool open (yarp::os::Searchable &config)
 
virtual bool close ()
 
virtual int read (yarp::sig::Vector &out)
 
virtual int getState (int ch)
 
virtual int getChannels ()
 
virtual int calibrateChannel (int ch)
 
virtual int calibrateChannel (int ch, double v)
 
virtual int calibrateSensor ()
 
virtual int calibrateSensor (const yarp::sig::Vector &value)
 
virtual yarp::os::Stamp getLastInputStamp ()
 
void onUpdate (const gazebo::common::UpdateInfo &_info)
 Gets World pose, velocity and acceleration of the base link and updates the base state vector.
 

Detailed Description

YARP device driver to give the gazebo state information of a desired base link of the robot The state information include.

  • absolute pose of the base link (x, y, z. roll, pitch, yaw)
  • linear and angular velocity of the base link in the world frame
  • linear and angular acceleration of the base link in the world frame
    Warning
    Note that the position angles, angular velocity and angular accelerations are expressed in radians-based units which is different from the usual YARP convention of expressing angles in degrees
    This device can be used by adding the following line in the SDF file of your robot,
    <plugin name="basestate" filename="libgazebo_yarp_basestate.so">
    <yarpConfigurationFile>model://path-to-the-configuration-file</yarpConfigurationFile>
    </plugin>

For configuration, the device supports two style. The first one, that is activated if disableImplicitNetworkWrapper parameter is given, is the following:

Parameter name Type Units Default Value Required Description Notes
yarpDeviceName string Yes name of the device used to identify the device instance in the gazebo_yarp_robotinterface plugin
baseLink string - - Yes name of the floating base link

An example configuration file might look like:

disableImplicitNetworkWrapper
yarpDeviceName basestate_device
baseLink torso_link

the same options can be passed via yarpConfigurationString tag to pass the configuration as a string, as in:

<plugin name="basestate" filename="libgazebo_yarp_basestate.so">
<yarpConfigurationString>(disableImplicitNetworkWrapper) (yarpDeviceName basestate_device) (baseLink torso_link)</yarpConfigurationFile>
</plugin>

Alternatively, if disableImplicitNetworkWrapper parameter is not given, the following DEPRECATED style is used:

The configuration file must contain two groups [WRAPPER] and [DRIVER]

Parameters accepted in the config argument of the open method for [WRAPPER]:

Parameter name Type Units Default Value Required Description Notes
name string - - Yes full name of the port opened by the device MUST start with a '/' character
period double ms 20 No refresh period of broadcast value in ms optional, default 20ms
device string - - Yes name of the network wrapper to connect to MUST be set to analogServer

Parameters accepted in the config argument of the open method for [DRIVER]:

Parameter name Type Units Default Value Required Description Notes
device string - - Yes name of the device driver to instantiate MUST be set to gazebo_basestate
baseLink string - - Yes name of the floating base link -

An example configuration file might look like,

[WRAPPER]
name /icubSim/floating_base/state:o
period 16
device analogServer
[DRIVER]
device gazebo_basestate
baseLink torso_link

This style is going to be removed in a future release of gazebo-yarp-plugins.

Constructor & Destructor Documentation

◆ GazeboYarpBaseStateDriver()

GazeboYarpBaseStateDriver::GazeboYarpBaseStateDriver ( )

◆ ~GazeboYarpBaseStateDriver()

GazeboYarpBaseStateDriver::~GazeboYarpBaseStateDriver ( )
virtual

Member Function Documentation

◆ open()

bool GazeboYarpBaseStateDriver::open ( yarp::os::Searchable & config)
virtual

◆ close()

bool GazeboYarpBaseStateDriver::close ( )
virtual

◆ read()

int GazeboYarpBaseStateDriver::read ( yarp::sig::Vector & out)
virtual

◆ getState()

int GazeboYarpBaseStateDriver::getState ( int ch)
virtual

◆ getChannels()

int GazeboYarpBaseStateDriver::getChannels ( )
virtual

◆ calibrateChannel() [1/2]

int GazeboYarpBaseStateDriver::calibrateChannel ( int ch)
virtual

◆ calibrateChannel() [2/2]

int GazeboYarpBaseStateDriver::calibrateChannel ( int ch,
double v )
virtual

◆ calibrateSensor() [1/2]

int GazeboYarpBaseStateDriver::calibrateSensor ( )
virtual

◆ calibrateSensor() [2/2]

int GazeboYarpBaseStateDriver::calibrateSensor ( const yarp::sig::Vector & value)
virtual

◆ getLastInputStamp()

yarp::os::Stamp GazeboYarpBaseStateDriver::getLastInputStamp ( )
virtual

◆ onUpdate()

void GazeboYarpBaseStateDriver::onUpdate ( const gazebo::common::UpdateInfo & _info)

Gets World pose, velocity and acceleration of the base link and updates the base state vector.


The documentation for this class was generated from the following files: