0
$\begingroup$

Rosanswers logo

Remote PC specs: 16GB ram, Nvidia GTx, 2.4GHz i7. It maps using a kinect with sufficient speed

The robot PC is a Compaq Mini, no Nvidia, 1.6 Ghz Intel Processor, not the most responsive PC out there...

remote operation is through ssh, from the remote PC to the mini with the kinect on the bot. a simple rosrun rviz rviz (with no pointclouds or anything at all) is incredibly slow when moving the empty grid and is just as slow with actual images

Can anything be done to speed up rviz noticeably?


Originally posted by etorobot on ROS Answers with karma: 30 on 2019-05-20

Post score: 0


Original comments

Comment by SleepyTurtle on 2019-05-21:
What computer are you running rviz on?

Comment by etorobot on 2019-05-21:
@sleepyTurtle the remote PC

Comment by gvdhoorn on 2019-05-21:
Just making sure: you're not using "X forwarding" with SSH, right (so using ssh -X ip.of.your.robot)?

What sort of graphics hw does the compaq mini have? Do you have any drivers installed, or are you running on an unaccelerated framebuffer?

Comment by etorobot on 2019-05-21:
@gvdhoorn it wouldn't run without the -X (waiting for master error).

compaq mini specs (from windows 7, it's dual boot with lubuntu):

processor - Intel Atom 1.6GHz, 1 GB RAM

adapter - Intel 945 Express Chiset

total available graphics memory - 251MB

dedicated video memory - 0 mb

system video memory - 64mb

shared system memory - 187 MB

Lubuntu Partition - 45 GB

Comment by gvdhoorn on 2019-05-21:
If you're using X forwarding then RViz is running on your robot, not on your own compaq mini PC. Only the graphics output is forwarded to your compaq mini over the network. That is most likely why it is so slow.

Looking at the specs of your compaq mini, running RViz on the mini is probably not going to be very fast, and forwarding the results over an SSH connection to another PC is not improving that.

Comment by etorobot on 2019-05-21:
@gvdhoorn the mini IS [on] the robot.

the remote PC is an Acer Aspire; 16GB RAM, Nvidia GTX, i7. Handheld mapping isn't too slow, especially compared with the ssh mini.

RViz doesn't even work directly on the mini; segmentation fault (core dumped).

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

a simple rosrun rviz rviz (with no pointclouds or anything at all) is incredibly slow when moving the empty grid and is just as slow with actual images [..] It wouldn't run without ssh -X (waiting for master error).

if you're using X forwarding you're essentially using whichever computer you're using to SSH from as the display device. You're running a heavy graphical application over a network connection. With all the rendering happening on the SSH server (that depends slightly on the exact SSH and X server configuration, but in general this is how it works). That's the most likely cause of the lag you're experiencing.

the remote PC is an Acer Aspire; 16GB RAM, Nvidia GTX, i7.

Ok, then I would suggest to run RViz on your Acer.

Treat it as a multi-machine ROS network setup. Be sure to set ROS_MASTER_URI and ROS_IP to appropriate values and things should work.

For your setup, something like this should work:

  • on the Acer: ROS_MASTER_URI=http://ip.of.compaq.mini:11311, ROS_IP=ip.of.acer.aspire
  • on the Mini: ROS_MASTER_URI=http://localhost:11311 (or whatever it is right now), ROS_IP=ip.of.compaq.mini

If you now start a roscore on the mini, you should be able to rostopic list from your Acer. Make sure to check the network setup pages on the wiki, especially the troubleshooting section (make sure clocks are synchronised fi).

PS: publishing pointclouds over a network connection is always going to be slower than processing / visualising them locally, so may still not necessarily work.


Edit:

i am running rviz on the acer through ssh -X to the mini.

you're not running it on the acer, but on the mini. X forwarding is similar to Windows Remote Desktop.

withouth the -X, I get segmentation fault (core dumped),

Do you have drivers installed for your Nvidia video card on the acer? What is the output of dpkg -l | grep nvidia?

which is the same thing i get trying to run rviz on the mini by itself.

The mini almost has no graphics hw. An intel945 is old and may not be capable of the accelerated OpenGL that RViz needs.

Are you saying run rviz on the acer without ssh to the mini

yes.

making the acer the master?

No. That is not needed.


Originally posted by gvdhoorn with karma: 86574 on 2019-05-21

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by etorobot on 2019-05-21:
i am running rviz on the acer through ssh -X to the mini. withouth the -X, I get segmentation fault (core dumped), which is the same thing i get trying to run rviz on the mini by itself. the mini is the master, and the rest of my network config is as you described.

Are you saying run rviz on the acer without ssh to the mini (making the acer the master)?

Comment by etorobot on 2019-05-21:
dpkg -l | grep nvidia gives no output, just a new line. apologies, i mixed up the errors.

without ssh, i tried rosrun rviz rviz as well as roscore on just the Acer: RViz waiting for master, could not contact ROS master at [http://miniSTATION:11311], retrying ...

if i try 'rosrun rviz rviz' in an ssh to mini terminal: QXcbConnection: could not connect to display

i only successfully rosrun rviz by ssh to the mini then roscore, then ssh -X to the mini, rosrun rviz from that window

edit: i "solved" the waiting for master by changing ROS_MATER_URI on the acer from mini's ip to "localhost", and the empty map responds at regular speed. the problem now is there are no options under fixed frame or topics to add as before, so nothing shows.

Comment by gvdhoorn on 2019-05-21:
Please read my first answer, especially the values I suggested for ROS_MASTER_URI and ROS_IP.

Do not use hostnames.

And install a proper Nvidia driver on your system. If you're using Ubuntu, use the Additional Drivers tab of the Software & Updates applet. Refer to sites such as this one for some guidance.

You'll want to start all regular nodes on your robot, and just RViz on your acer.

Be sure to add the ROS_MASTER_URI and ROS_IP variables to your .bashrc (if using bash). Otherwise make sure to export those variables in all terminals that you open and use.

Comment by etorobot on 2019-05-21:
@gvdhoorn it works! no more lag! thank you! what is the problem with hostnames then?

It appears there are two Nvidia drivers installed, but the device is using an alternative, Nouveau display driver. clueless as to why.

Comment by gvdhoorn on 2019-05-22:\

what is the problem with hostnames then?

there is no problem per se, but if you don't have a working DNS server that can resolve all hostnames into IPs, you're going to run into problems. Seeing as I don't expect you have a working DNS server -- and seeing the error you posted earlier -- I figured IP addresses would probably be easier to get working. If you can setup DNS you can use hostnames of course.

It appears there are two Nvidia drivers installed, but the device is using an alternative, Nouveau display driver.

It's up to you, but the nvidia driver (so not Nouveau) is typically preferred when using ROS.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.