ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

convert from int32 to int

asked 2016-01-20 14:55:37 -0600

chenchengshao@gmail.com gravatar image

How to compare int32 with int or convert int32 to int?

Looks like No working this way: Int = (int) Int32;

edit retag flag offensive close merge delete

Comments

1

This forum is primarily for questions about ROS (Robot Operating System), and your question does not appear to be about ROS. You will probably get a better answer by asking on a general programming site like Stack Overflow.

ahendrix gravatar image ahendrix  ( 2016-01-20 17:01:29 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2016-01-21 02:03:48 -0600

F.Brosseau gravatar image

If the int32 come from a std::msgs you can access the value with .data

int var = yourMsg.data

here is the documentation : http://docs.ros.org/api/std_msgs/html/msg/Int32.html

edit flag offensive delete link more

Question Tools

Stats

Asked: 2016-01-20 14:55:37 -0600

Seen: 4,160 times

Last updated: Jan 21 '16