nao camera transform problem rviz [closed]

asked 2014-05-06 23:18:32 -0500

Tirgo gravatar image

updated 2014-05-22 02:07:42 -0500

Hello,

i am currently working with the nao and i am getting some really strange behavior, when i use the camera of the nao. But step by step:

1.) If i only start the nao camera, more specific the top camera, everything works fine. I am able to display the data in rviz, as camera data. I use as fixed frame the correct frame "CameraTop_frame". The camera_info is published and recivied correctly. Everything works as expected.

Now the problem:

If i add a static_transform to the launch file, between the frames "world" and "CameraTop_frame" (The rest stays the same!!) nothing works. Rviz ist not able to display the incoming data as camera data. Even if i choose as fixed frame again "CameraTop_frame" like in the step before. Rviz is able to display the data as image data, using the world or the CameraTop_frame.

My conclusion is that something is wrong with the /camera_info data, which is needed for displaying the data as camera data. But how is it possible that a static transform, somehow destroys the /camera_info data completely? The topic /camera_info is still there and data is published, like in step 1.). Even Rviz is complaining about the /camera_info stuff:

Warning: No Camerainfo recieved on .....

Hoping for some help, because i really don't know what to do.

EDIT:

I solved the problem by changing a line in the nao_camera.py script. It seems that it was some kind of a timing problem. I changed the line "img.header.stamp = rospy.Time(stampAL)" to "img.header.stamp = rospy.Time.now()". After that everything works perfect.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Tirgo
close date 2015-12-07 02:10:28.950610

Comments

I am also getting this warning: [ WARN] [1399455010.185558605]: MessageFilter [target=world ]: Dropped 100.00% of messages so far. Please turn the [ros.rviz.message_notifier] rosconsole logger to DEBUG for more information. [ WARN] [1399455010.185655733]: MessageFilter [target=world ]: The majority of dropped messages were due to messages growing older than the TF cache time. The last message's timestamp was: 1253149784.947127, and the last frame_id was: /CameraTop_frame

Tirgo gravatar image Tirgo  ( 2014-05-06 23:33:52 -0500 )edit

If i hit the Reset button in Rviz, it displays one image at the camera display and then it freezes.

Tirgo gravatar image Tirgo  ( 2014-05-07 00:14:43 -0500 )edit

Defining a transform should not affect the presence or absence of camera info. Try ``rostopic list`` to verify the topic name and ``rostopic echo /camera_info`` to see the contents.

joq gravatar image joq  ( 2014-05-08 11:43:20 -0500 )edit

Hello, the topic camera_info is published correctly. But i have an other update: If I add the param "use_sim_time", with the value true, to the launch file something strange happens. /camera_info is receivied correctly by rviz, but now receiving the image topic is a problem for rviz.

Tirgo gravatar image Tirgo  ( 2014-05-08 22:59:32 -0500 )edit

Why are you setting use_sim_time? Aren't you using the real device?

joq gravatar image joq  ( 2014-05-09 05:51:00 -0500 )edit

It was just for testing, because the error looked similar to one i had some time ago. Yes i am using a real device.

Tirgo gravatar image Tirgo  ( 2014-05-11 21:55:49 -0500 )edit

Please edit your question and paste in the exact static transform command you added.

joq gravatar image joq  ( 2014-05-12 05:02:02 -0500 )edit