Ros2ImuMessage#
Fully qualified name: isaacsim::ros2::bridge::Ros2ImuMessage
-
class Ros2ImuMessage : public isaacsim::ros2::bridge::Ros2Message#
Class implementing a
sensor_msgs/msg/Imu
message.Public Functions
-
virtual void writeHeader(double timeStamp, std::string &frameId) = 0#
Write the message header.
- Parameters:
timeStamp – Time (seconds).
frameId – Transform frame with which this data is associated.
- virtual void writeAcceleration(
- bool covariance = false,
- const std::vector<double> &acceleration = std::vector<double>(),
Write the
linear_acceleration
or its covariance.- Parameters:
covariance – If true, only the element 0 of the associated covariance matrix will be written to -1, not the acceleration (regardless of its value). If false, the acceleration values will be written.
acceleration – Linear acceleration.
- virtual void writeVelocity(
- bool covariance = false,
- const std::vector<double> &velocity = std::vector<double>(),
Write the
angular_velocity
or its covariance.- Parameters:
covariance – If true, only the element 0 of the associated covariance matrix will be written to -1, not the velocity (regardless of its value). If false, the velocity values will be written.
velocity – Angular velocity.
- virtual void writeOrientation(
- bool covariance = false,
- const std::vector<double> &orientation = std::vector<double>(),
Write the
orientation
or its covariance.- Parameters:
covariance – If true, only the element 0 of the associated covariance matrix will be written to -1, not the orientation (regardless of its value). If false, the orientation values will be written.
orientation – Orientation.
-
inline void *getPtr()#
Get the message pointer.
- Returns:
The pointer to the message if it has been created and initialized properly, otherwise
nullptr
.
-
virtual const void *getTypeSupportHandle() = 0#
Get the pointer to the struct that contains the ROS IDL message type support data.
The pointer points to a ROS IDL struct if the message if founded.
Message type
ROS IDL struct
Topic (Message)
rosidl_message_type_support_t
Service
rosidl_service_type_support_t
Action
rosidl_action_type_support_t
- Returns:
The pointer to the struct, otherwise
nullptr
.
Protected Attributes
-
void *m_msg = nullptr#
Message pointer.
-
virtual void writeHeader(double timeStamp, std::string &frameId) = 0#