前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >rviz远程桌面启动问题解决,多机器分布式本地运行rviz

rviz远程桌面启动问题解决,多机器分布式本地运行rviz

作者头像
CreateAMind
发布2018-07-24 16:00:00
1.8K0
发布2018-07-24 16:00:00
举报
文章被收录于专栏:CreateAMind

In either case, VNC or forwarding X is probably not the best way to work with rviz remotely. A much better plan would be to follow the directions on NetworkSetup to get your computer connected to the robot's rosmaster (setting the ROS_MASTER_URI and ROS_IP for both machines is what I do instead of setting up DNS). This way, you can run rviz locally on your computer, only sending ROS data across the network instead of forwarding X or VNC, both of which I found to be quite slow when working with a 3D application like rviz.

可以多机器ros,rviz运行在本地!!

代码语言:javascript
复制
A common task is to SSH into the robot's computer and run RVIZ to get the laser output and other visualization. Running RVIZ directly on the remote computer will not work due to the way RVIZ is implemented. The workaround is to run RVIZ locally. To do this we need to set the local computer to locate the remote MASTER NODE in order to display the right information.
代码语言:javascript
复制
README on getting RVIS to work over multiple computers
------------------------------------------------------

A common task is to SSH into the robot's computer and run RVIZ to get the laser output and other visualization. Running RVIZ directly on the remote computer will not work due to the way RVIZ is implemented. The workaround is to run RVIZ locally. To do this we need to set the local computer to locate the remote MASTER NODE in order to display the right information.

Assume:
IP: 192.168.1.0 // remote computer (robot)
IP: 192.168.1.1 // local computer (host)

*** ssh into remote computer ***
1. ssh -X erratic@192.168.1.0

At the remote terminal:
2. export ROS_MASTER_URI=http://192.168.1.0:11311   //this ensures that we do not use localhost, but the real IP address as master node

3. export ROS_IP=192.168.1.0 		//this ensures that ROS knows that we cannot use hostname directly (due to DHCP firewall issues)

4. roscore

At the local terminal:
1. export ROS_MASTER_URI=http://192.168.1.0:11311   //tells local computer to look for the remote here

2. export ROS_IP=192.168.1.1		//this ensures that ROS knows that we cannot use hostname directly (due to DHCP firewall issues)

3. rosrun rviz rviz 			// fires up rviz on local computer. It will attach to the master node of the remote computer

** to check, open a remote terminal **
1. rxgraph

** Note, everytime a new terminal is open on the local/remote computer, we have to call the 2 exports commands. To make this permanent, edit the ~/.bashrc file:
1. sudo gedit ~/.bashrc //add the two export commands at the end of the file.

2. source ~/.bashrc //and restart terminal
本文参与 腾讯云自媒体同步曝光计划,分享自微信公众号。
原始发表:2017-06-13,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 CreateAMind 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档