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

sending sensor_msgs/CameraInfo with rosjava

asked 2012-06-01 13:24:55 -0600

jpiramirez gravatar image


I'm attempting to send a sensor_msgs/CameraInfo message using rosjava. The message itself gets sent just fine, but I'd like to fill in every field of the message with my correct camera calibration information. I noticed there is a setK() method, as well as setP() and others to accomplish this task.

When I try to set those fields to some values, rostopic echo reports different ones.

In my code I have:

sensor_msgs.CameraInfo caminfomsg = caminfopub.newMessage();
double[] K = {160, 0, 160, 0, 160, 120, 0, 0, 1};

But when I run it and take a look with rostopic this is what I get:

K: [4.4e-323, 5.337368564e-315, 0.0, 5.337368564e-315, 0.0, 5.337368564e-315, 5.33542582e-315, 0.0, 0.0]

Any suggestions?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2012-07-03 20:00:11 -0600

damonkohler gravatar image

This is issue 125. I should have a patch out today or tomorrow.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2012-06-01 13:24:55 -0600

Seen: 347 times

Last updated: Jul 03 '12