Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Float[9] covariance array in C++

I am trying to fill in an IMU message, and it requires 3 arrays of Float64's. How can I fill such an array in C++, initializing the first element with value -1 and the other values 0.

The documentation of the message can be found here: http://docs.ros.org/api/sensor_msgs/html/msg/Imu.html

I know the C++ double type should be the same as ROS Float64. This doesn't help me much unfortunately, I can't find any way to correctly initialize this array.

Float[9] covariance array in C++

I am trying to fill in an IMU message, and it requires 3 arrays of Float64's. How can I fill such an array in C++, initializing the first element with value -1 and the other values 0.

The documentation of the message can be found here: http://docs.ros.org/api/sensor_msgs/html/msg/Imu.html

I know the C++ double type should be the same as ROS Float64. This doesn't help me much unfortunately, I can't find any way to correctly initialize this array.

Float[9] Float64[9] covariance array in C++

I am trying to fill in an IMU message, and it requires 3 arrays of Float64's. How can I fill such an array in C++, initializing the first element with value -1 and the other values 0.

The documentation of the message can be found here: http://docs.ros.org/api/sensor_msgs/html/msg/Imu.html

I know the C++ double type should be the same as ROS Float64. This doesn't help me much unfortunately, I can't find any way to correctly initialize this array.