Intermodalics / tango_ros

ROS related software for Tango
Apache License 2.0
67 stars 22 forks source link

Frame rate very slow? #343

Closed trinamntn08 closed 6 years ago

trinamntn08 commented 7 years ago

I want to record Image_Raw from Project Tango into a bag by using the command below: rosbag record /tango/camera/color_1/image_raw
i got a bag with sequence of image_raw. BUt once, i visualize on rviz, i realize the frame rate is really slow. Is there any method to verify frame rate to record into the bag , and how can we change this rate ?

PerrineAguiar commented 7 years ago

You can check the rate of a topic with the following command: topic hz <topic_name>. Unfortunately there is no way to change the rate of the color image topic, it should be around 1Hz which is very slow. The main reason is the big size of the image (1920*1080) which leads to:

To increase the rate, you could try:

trinamntn08 commented 7 years ago

Is there any chance that i can exceed more than 20 Hz ?

PerrineAguiar commented 7 years ago

I don't think you will be able to exceed 20Hz for the color camera topic, even using the compressed version. If slow rate is really an issue for you, you will need to figure out how to record a rosbag directly on device. That way, using the device as master, you would avoid latency due to wifi transport. As mentioned in #170, having a rosbag recorder on device is not on our roadmap.

eric-schleicher commented 7 years ago

@PerrineAguiar usb connection is possible (physically) in my application and I'm interested in doing this. Is there information somewhere on how to run in a tethered configuration? this is the first time I've seen it referenced.

PerrineAguiar commented 7 years ago

@eric-schleicher To enable USB tethering on your device, plug the device to your desktop via USB and go to: Settings --> Wireless & networks --> Tethering & portable hotspot --> enable USB tethering. On your desktop, you should then be able to connect to this new wired connection. Still on your desktop, run 'roscore'. On your device start the TangoROSStreamer app, go to the settings and set the new master uri as: http://<ip_address>:11311 To find the new ip address of your desktop, you can run ifconfig and search for an interface called usb0. The latter corresponds to your tethered network and there you should see the correct ip address.

Note that for any new terminal where you want to communicate with the tango node, you will have to set the ROS_MASTER_URI with this ip address using the following command: export ROS_MASTER_URI=http://<ip_address>:11311

For more information about ROS network configuration, yo can check this tutorial.

eric-schleicher commented 7 years ago

Thank you very much!

Awesome :)

trinamntn08 commented 7 years ago

@eric-schleicher : can you tell me how to record raw images via USB connection, pls ?

eric-schleicher commented 7 years ago

Sorry @trinamntn08 I'm not sure how to do that. you might be able to find a ROS node that subscribes to a topic with RGB images and writes them to disk.