ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
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.