Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frame rate very slow? #343

Closed
trinamntn08 opened this issue Jul 11, 2017 · 8 comments
Closed

Frame rate very slow? #343

trinamntn08 opened this issue Jul 11, 2017 · 8 comments

Comments

@trinamntn08
Copy link

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 ?

@smits smits added ready and removed ready labels Jul 11, 2017
@PerrineAguiar
Copy link

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:

  • slow serialization/deserialization of the image message
  • slow transport of the image message over wifi

To increase the rate, you could try:

  • using USB tethering with your Tango device instead of wifi
  • recording the compressed image instead (/tango/camera/color_1/image_raw/compressed). Its rate should be between 5 and 10 Hz. Note that you can change the compressing format/level using dynamic reconfigure, as explained at the end of this tutorial.

@trinamntn08
Copy link
Author

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

@PerrineAguiar
Copy link

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
Copy link

eric-schleicher commented Jul 14, 2017

@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
Copy link

@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
Copy link

Thank you very much!

Awesome :)

@trinamntn08
Copy link
Author

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

@eric-schleicher
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants