imu_advanced_navigation_anpp
Public Member Functions | List of all members
imu_advanced_navigation_anpp::Driver Class Reference

#include <Driver.hpp>

Inheritance diagram for imu_advanced_navigation_anpp::Driver:

Public Member Functions

 Driver ()
 
void openURI (std::string const &uri)
 
void setDeviceBaudrate (uint32_t rate)
 
bool getUseDeviceTime () const
 
void setUseDeviceTime (bool enable)
 
void clearPeriodicPackets ()
 
void reset (RESET_MODE mode)
 
DeviceInformation readDeviceInformation ()
 
base::Time readTime ()
 
Status readStatus ()
 
CurrentConfiguration readConfiguration ()
 
void setConfiguration (Configuration const &conf)
 
Status getIMUStatus () const
 
base::samples::RigidBodyState getWorldRigidBodyState () const
 
base::samples::RigidBodyState getBodyRigidBodyState () const
 
base::samples::RigidBodyAcceleration getAcceleration () const
 
base::samples::IMUSensors getIMUSensors () const
 
gps_base::Solution getGNSSSolution () const
 
gps_base::SolutionQuality getGNSSSolutionQuality () const
 
gps_base::SatelliteInfo getGNSSSatelliteInfo () const
 
void setStatusPeriod (int period)
 
void setUTM (int zone, bool north, Eigen::Vector3d const &local_origin=Eigen::Vector3d::Zero())
 
void setPositionPeriod (int period, bool with_errors=true)
 
void setOrientationPeriod (int period, bool with_errors=true)
 
void setNEDVelocityPeriod (int period, bool with_errors=true)
 
void setAccelerationPeriod (int period)
 
void setBodyVelocityPeriod (int period)
 
void setAngularVelocityPeriod (int period)
 
void setAngularAccelerationPeriod (int period)
 
void setRawSensorsPeriod (int period)
 
void setGNSSPeriod (int period)
 
void setGNSSSatelliteSummaryPeriod (int period)
 
void setGNSSSatelliteDetailsPeriod (int period)
 
void setNorthSeekingInitializationStatusPeriod (int period)
 
void setCurrentTimestamp (base::Time const &time)
 
base::Time getCurrentTimestamp () const
 
int poll ()
 
void resetPollSynchronization ()
 

Constructor & Destructor Documentation

Driver::Driver ( )

Member Function Documentation

void Driver::clearPeriodicPackets ( )

Clear all defined periodic packets

base::samples::RigidBodyAcceleration Driver::getAcceleration ( ) const

Acceleration information

base::samples::RigidBodyState Driver::getBodyRigidBodyState ( ) const

Body-relative information

This contains only body-relative velocity data

base::Time Driver::getCurrentTimestamp ( ) const

Return the current timestamp for packets read by poll()

gps_base::SatelliteInfo Driver::getGNSSSatelliteInfo ( ) const

GNSS satellite information

gps_base::Solution Driver::getGNSSSolution ( ) const

GNSS solution data

gps_base::SolutionQuality Driver::getGNSSSolutionQuality ( ) const

GNSS quality information

base::samples::IMUSensors Driver::getIMUSensors ( ) const

Raw sensor data

Status Driver::getIMUStatus ( ) const

The current system+filter status

bool Driver::getUseDeviceTime ( ) const

Whether timestamping is using the device's time

Use this if the device is synchronized with UTC (e.g. using a GPS-based time source

Parameters
enablewhether the driver should use the device time (true) or the local host time (false). The default is false.
base::samples::RigidBodyState Driver::getWorldRigidBodyState ( ) const

The NWU position

void Driver::openURI ( std::string const &  uri)
int Driver::poll ( )

Poll for periodic packets

The method determines if a "packet period" just got completed, and returns the period that has been completed if it did so.

For instance, with

setOrientationPeriod(1); setGNSSPeriod(10);

poll() will return 1 each time a full orientation-with-error has been received, and 10 when the GNSS data has been received. Note that within a given sensor cycle (i.e. same timestamp), it is possible that a period with a higher ID is returned before one with a lower ID.

Returns
the ID of the period that has just been completed. 0 means that a packet has been processed, but no period was completed. -1 means that poll() is attempting to re-synchronize with the period train.
CurrentConfiguration Driver::readConfiguration ( )

Read the current configuration

DeviceInformation Driver::readDeviceInformation ( )

Read the device information

This is mainly useful to verify that the device is connected

Status Driver::readStatus ( )

Read the system and filter status

base::Time Driver::readTime ( )

Read the device's current time

void Driver::reset ( RESET_MODE  mode)

Reset the device

void Driver::resetPollSynchronization ( )

Force poll() to re-synchronize to a full period

void Driver::setAccelerationPeriod ( int  period)

Set the period at which the acceleration in body frame should be generated. This acceleration does not contain the acceleration of gravity

Periodic messages are processed by poll()

This updates the acceleration structure as returned by getAcceleration().

Parameters
periodthe period in multiples of the base packet period
void Driver::setAngularAccelerationPeriod ( int  period)

Set the period at which the angular accelerations in body frame should be generated.

Periodic messages are processed by poll()

This updates the acceleration structure as returned by getAcceleration();

Parameters
periodthe period in multiples of the base packet period
void Driver::setAngularVelocityPeriod ( int  period)

Set the period at which the angular velocities in body frame should be generated.

Periodic messages are processed by poll()

This updates the body-relative RBS as returned by getBodyRigidBodyState();

Parameters
periodthe period in multiples of the base packet period
void Driver::setBodyVelocityPeriod ( int  period)

Set the period at which the velocity in body frame should be generated.

Periodic messages are processed by poll()

This updates the body-relative RBS as returned by getBodyRigidBodyState();

Parameters
periodthe period in multiples of the base packet period
void Driver::setConfiguration ( Configuration const &  conf)

Read the current configuration

void Driver::setCurrentTimestamp ( base::Time const &  time)

Set the current timestamp for packets read by poll()

Set the timestamp for the follow-up packets

This is meant for testing purposes

void Driver::setDeviceBaudrate ( uint32_t  rate)

Change the device's baudrate

After this call, the driver is effectively unusable. You must close it and re-open with a new URI

void Driver::setGNSSPeriod ( int  period)

Set the period at which geodetic position should be generated

Periodic messages are processed by poll()

This updates the structure returned by getGNSSolution()

Parameters
periodthe period in multiples of the base packet period
void Driver::setGNSSSatelliteDetailsPeriod ( int  period)

Set the period at which GNSS detailed satellite info should be generated

Periodic messages are processed by poll()

This updates the structure returned by getGNSSSatelliteDetails()

Parameters
periodthe period in multiples of the base packet period
void Driver::setGNSSSatelliteSummaryPeriod ( int  period)

Set the period at which GNSS satellite summary should be generated

Periodic messages are processed by poll()

This updates the structure returned by getGNSSSolutionQuality()

Parameters
periodthe period in multiples of the base packet period
void Driver::setNEDVelocityPeriod ( int  period,
bool  with_errors = true 
)

Set the period at which the velocity in the NED frame should be generated

Periodic messages are processed by poll()

This updates the world-relative RBS as returned by getWorldRigidBodyState().

Parameters
periodthe period in multiples of the base packet period
void Driver::setNorthSeekingInitializationStatusPeriod ( int  period)

Set the period at which we receive the north seeking status

It is reported in the Status structure

void Driver::setOrientationPeriod ( int  period,
bool  with_errors = true 
)

Set the period at which the orientation should be generated

Periodic messages are processed by poll().

This updates the world-relative RBS as returned by getWorldRigidBodyState().

Parameters
periodthe period in multiples of the base packet period
with_errorsif true, generate the orientation errors at the same period. Otherwise, do not generate them
void Driver::setPositionPeriod ( int  period,
bool  with_errors = true 
)

Set the period at which the position should be generated

Periodic messages are processed by poll().

This updates the world-relative RBS as returned by getWorldRigidBodyState().

You must set the UTM position and origin before calling this

Parameters
periodthe period in multiples of the base packet period
with_errorsif true, generate the orientation errors at the same period. Otherwise, do not generate them
void Driver::setRawSensorsPeriod ( int  period)

Set the period at which the raw sensors should be generated.

Periodic messages are processed by poll()

This updates the raw sensor structure as returned by getRawSensors()

Parameters
periodthe period in multiples of the base packet period
void Driver::setStatusPeriod ( int  period)

Set the period at which the status should be updated

Periodic messages are processed by poll().

This updates the structure as returned by getStatus()

Parameters
periodthe period in multiples of the base packet period
void Driver::setUseDeviceTime ( bool  enable)

Whether timestamping should be using the device's time

Use this if the device is synchronized with UTC (e.g. using a GPS-based time source

Parameters
enablewhether the driver should use the device time (true) or the local host time (false). The default is false.
void Driver::setUTM ( int  zone,
bool  north,
Eigen::Vector3d const &  local_origin = Eigen::Vector3d::Zero() 
)

Set the UTM zone that is used to convert the global position into a local RBS


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