Ask Your Question

sending sensor_msgs/CameraInfo with rosjava

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

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 -0500

damonkohler gravatar image

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

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


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

Seen: 297 times

Last updated: Jul 03 '12