Fixposition SDK 0.0.0-heads/main-0-g200d201
Collection of c++ libraries and apps for use with Fixposition products on Linux
Loading...
Searching...
No Matches
fpsdk::common::ros1 Namespace Reference

ROS1 types and utils. More...

Classes

class  BagWriter
 ROS1 bag (rosbag) writer. More...

Functions

template<typename RosMsgT>
void DeserializeMessage (const std::vector< uint8_t > &buf, RosMsgT &msg)
 Deserialise ROS1 message.
ros::Time ConvTime (const time::Time &time)
 Convert to ROS time (atomic -> POSIX).
time::Time ConvTime (const ros::Time &time)
 Convert from ROS time (POSIX -> atomic).
void RedirectLoggingToRosConsole (const char *logger_name=ROSCONSOLE_DEFAULT_NAME)
 Redirect fpsdk:common::logging to ROS console.

Detailed Description

ROS1 types and utils.

Function Documentation

◆ DeserializeMessage()

template<typename RosMsgT>
void fpsdk::common::ros1::DeserializeMessage ( const std::vector< uint8_t > & buf,
RosMsgT & msg )
inline

Deserialise ROS1 message.

Template Parameters
RosMsgTThe ROS1 message type
Parameters
[in]bufThe serialised ROS message
[out]msgThe deserialised ROS message

Definition at line 128 of file ros1.hpp.

◆ ConvTime() [1/2]

ros::Time fpsdk::common::ros1::ConvTime ( const time::Time & time)

Convert to ROS time (atomic -> POSIX).

Parameters
[in]timeThe Time object (atomic)
Returns
the ROS time object (POSIX)

◆ ConvTime() [2/2]

time::Time fpsdk::common::ros1::ConvTime ( const ros::Time & time)

Convert from ROS time (POSIX -> atomic).

Parameters
[in]timeThe ROS time object (POSIX)
Returns
the Time object (atomic)

◆ RedirectLoggingToRosConsole()

void fpsdk::common::ros1::RedirectLoggingToRosConsole ( const char * logger_name = ROSCONSOLE_DEFAULT_NAME)

Redirect fpsdk:common::logging to ROS console.

Note
This is only available when built in a ROS1 environment.

This configures the fpsdk::common::logging facility to output via the ROS console. This does not configure the ROS console (logger level, logger name, etc.).

The mapping of fpsdk::common::logging::LoggingLevel to ros::console::levels is as follows:

  • TRACE and DEBUG --> DEBUG
  • INFO and NOTICE --> INFO
  • WARNING --> WARN
  • ERROR --> ERROR
  • FATAL --> FATAL
Parameters
[in]logger_nameThe name of the logger. The default value should give the caller package's ROSCONSOLE_DEFAULT_NAME, for example, "ros1_fpsdk_demo". That is, typically this argument should be left empty (the default value).