Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

msg file float variable digit problem

  • OS: Ubuntu 16.04 LTS with 4.15.0-52-generic kernel
    • ROS version: Kinetic

Hello, I have a message file like this,

my.msg

Header header
float32 angle
uint64 x_pos
float32 y_pos
string direction
uint8 color_lane_count
uint8 no_color_lane
uint8 no_pos

The output like this. The angle looks like has a one digit but it is 0 always. But why ROS msg is not publishing this one also with 10 digit accuracy.

angle: 314.0
x_pos: 11
y_pos: -19.6000003815
direction: "Straight ahead"
color_lane_count: 0
no_color_lane: 1
no_pos: 1

I want to publish my float messages with 2 digit after decimal. I'm writing the node in C++ and If it's nothing to do with ROS msg publishing, I'll try to fix the problem on my code.

Thanks!

msg file float variable digit problem

  • OS: Ubuntu 16.04 LTS with 4.15.0-52-generic kernel
    • ROS version: Kinetic

Hello, I'm writing a node for Pepperl+Fuchs PGV100. You can check it out on it's github page.

I have a message file like this,

my.msg

Header header
float32 angle
uint64 x_pos
float32 y_pos
string direction
uint8 color_lane_count
uint8 no_color_lane
uint8 no_pos

The output like this. The angle looks like has a one digit but it is 0 always. But why ROS msg is not publishing this one also with 10 digit accuracy.

angle: 314.0
x_pos: 11
y_pos: -19.6000003815
direction: "Straight ahead"
color_lane_count: 0
no_color_lane: 1
no_pos: 1

I want to publish my float messages with 2 digit after decimal. I'm writing the node in C++ and If it's nothing to do with ROS msg publishing, I'll try to fix the problem on my code.

Thanks!

msg file float variable digit problem

  • OS: Ubuntu 16.04 LTS with 4.15.0-52-generic kernel
    • ROS version: Kinetic

Hello, I'm writing a node for Pepperl+Fuchs PGV100. PGV100. You can check it out on it's github page.

I have a message file like this,

my.msg

Header header
float32 angle
uint64 x_pos
float32 y_pos
string direction
uint8 color_lane_count
uint8 no_color_lane
uint8 no_pos

The output like this. The angle looks like has a one digit but it is 0 always. But why ROS msg is not publishing this one also with 10 digit accuracy.

angle: 314.0
x_pos: 11
y_pos: -19.6000003815
direction: "Straight ahead"
color_lane_count: 0
no_color_lane: 1
no_pos: 1

I want to publish my float messages with 2 digit after decimal. I'm writing the node in C++ and If it's nothing to do with ROS msg publishing, I'll try to fix the problem on my code.

Thanks!

msg file float variable digit problem

  • OS: Ubuntu 16.04 LTS with 4.15.0-52-generic kernel
    • ROS version: Kinetic

Hello, I'm writing a node for Pepperl+Fuchs PGV100. PGV100.

You can check it out on it's github page.

I have a message file like this,

my.msg

Header header
float32 angle
uint64 x_pos
float32 y_pos
string direction
uint8 color_lane_count
uint8 no_color_lane
uint8 no_pos

The output like this. The angle looks like has a one digit but it is 0 always. But why ROS msg is not publishing this one also with 10 digit accuracy.

angle: 314.0
x_pos: 11
y_pos: -19.6000003815
direction: "Straight ahead"
color_lane_count: 0
no_color_lane: 1
no_pos: 1

I want to publish my float messages with 2 digit after decimal. I'm writing the node in C++ and If it's nothing to do with ROS msg publishing, I'll try to fix the problem on my code.

Thanks!