Ask Your Question

rviz view_robot extreme slowdown

asked 2017-07-21 22:34:27 -0500

underactuated gravatar image

I am trying to understand the reason for an extreme slowdown in visualization of the turtlebot view.

I am very new to ROS. I have a recently assembled turtlebot that I can tele-operate. It took me some time to figure out how to launch its 3d camera (Orbbec Astra); I only managed to do it by installing astra_camera and astra_launch packages. I am now trying to visualize what the robot sees using rviz. After launching the camera on the robot (roslaunch astra_launch astra.launch) I launch rviz on the workstation: roslaunch turtlebot_rviz_launchers view_robot.launch.

The problem is that visualization works extremely slow. I only tried Image and DepthCloud. Visualization starts with just a few frames per second, quickly degrading to less than a frame per second, then freezing. Occasionally unfreezing to show a few frames, then freezing again. DepthCloud is probably even worse than Image.

It seems to me there is some problem in communication between the workstation and turtlebot. I observed what happens to ping readings when I use rviz. When there is no stream of data (Image and DepthCloud are unchecked in rviz), everything is fine, ping time is in order of milliseconds, and I have no problem tele-operating the robot. When I turn on the data stream (check Image or DepthCloud), ping time quickly climbs to hundreds or thousands of milliseconds, rviz shows something, then freezes for sometime, like I described above. At this point I either cannot control the bot via teleop, or there is a lag of up to many seconds. If I interrupt the data stream by unchecking corresponding boxes in rviz, everything comes back to normal and I can teleop again.

Can somebody help me understand this behavior and how it can be fixed? I have ubuntu 14.04, ROS-indigo. The turtlebot is new, and the workstation is not very old.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-07-23 18:19:42 -0500

underactuated gravatar image

updated 2017-07-24 13:03:00 -0500

I partially resolved my issue. When displaying the camera feed in RViz, I had to choose appropriate settings for the Transports hints. Namely, I had to switch from raw to compressed, or compressedDepth (for the DepthCloud). This setting affects which topic rviz subscribes to. For example, if you are displaying Image, and Transport Hint is set to raw, rviz will subscribe to /camera/rgb/image_rect_color; while if Transport Hint is set to compressed, rviz will subscribe to /camera/rgb/image_rect_color/compressed. I guess the compressed stream transmits much faster. You can also verify with 'rostopic hz' command that the publishing rate for the compressed topic is substantially higher.

Perhaps it was a trivial issue, but as I said I am new to ROS.

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



Asked: 2017-07-21 22:34:27 -0500

Seen: 577 times

Last updated: Jul 24 '17