sending sensor_msgs/CameraInfo with rosjava
Hello,
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};
caminfomsg.setK(K);
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?