Ask Your Question
2

Remote Rviz visualisation / Hector_SLAM

asked 2019-02-04 04:51:38 -0500

JankenGatsu gravatar image

Hello !

Actually I'm working on hector_slam with my raspberry pi 3 ( ROS Kinetic / Ubuntu Mate ), and it works pretty well.

Btw I use a RPLIDAR A1 from slamtech using a USB port from my PI3.

But I want to see the Rviz visualisation remotly on my PC and not on my PI.

I did all the network configurations between my PI and py PC. But when I try my launch command ( on my pc ) :

$ export ROS_MASTER_URI=http://IP_ADDRESS_OF_RASPBERRY_PI:11311
$ export ROS_IP=IP_ADDRESS_OF_LOCAL_PC
$ roslaunch rplidar_ros view_slam.launch

I get this error :

[rplidarNode-1] process has died [pid 2570, exit code 255, cmd /home/janken/catkin_ws/devel/lib/rplidar_ros/rplidarNode __name:=rplidarNode __log:=/home/janken/.ros/log/195e88a2-2868-11e9-a4ec-b827eb0ab788/rplidarNode-1.log].

log file: /home/janken/.ros/log/195e88a2-2868-11e9-a4ec-b827eb0ab788/rplidarNode-1*.log

I suppose that there is a problem from my RPLIDAR. I actually suppose that I get this error because my LIDAR is not directly wired to my PC , maybe I didn't understand well the utility of ROS_MASTER.

Thanks for reading, I hope you will help me ! I'm pretty new in this world :)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-02-04 19:30:02 -0500

robustify gravatar image

By default, when you roslaunch a launch file, all the nodes start up on the computer that ran it. By pointing ROS_MASTER_URI to the Pi, you're just telling the nodes to connect to the roscore running on the Pi. Therefore, your PC is trying to connect to the LIDAR, which of course isn't connected.

It is possible to roslaunch and have some nodes start on another computer using <machine> tag (doc_link), but I've found this to be quite tedious. Give it a shot if you'd like though.

In your case, I would create a launch file to run all your software including the LIDAR driver and SLAM nodes, then ssh into the Pi from your PC and roslaunch it. Then, make a launch file on your PC that just runs Rviz and launch it, after setting the ROS_MASTER_URI and ROS_IP environment variables as you showed in your post.

edit flag offensive delete link more

Comments

Thank you ! :D

I found a easiest solution base on your answer :)

I just launch my nodes on my PI, configure the ROS_MASTER_URI on the two machines and after that i just launch rviz on my PC and I can actually see the nodes running :)

JankenGatsu gravatar image JankenGatsu  ( 2019-02-05 11:47:26 -0500 )edit

Hey, could you please post a screenshot of all the terminals you've used. I'm unable to configure the two machines.

drash222 gravatar image drash222  ( 2019-04-06 05:49:42 -0500 )edit

Let's not post screenshots of terminals. See the Support guidelines.

gvdhoorn gravatar image gvdhoorn  ( 2019-04-06 06:04:53 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2019-02-04 04:51:38 -0500

Seen: 801 times

Last updated: Feb 04 '19