Navigation stack not working [ROS2, RE3]

Hello,
I tried to run this navigation demo on a Stretch RE3 robot but I met this error

The ros process then directly exited.

The command I ran was

ros2 launch stretch_nav2 offline_mapping.launch.py teleop_type:=keyboard

Do you have any idea what might go wrong?

Hi @Peiqi_Liu, I was able to reproduce the errors you’re seeing by running that command while SSH-ed into the robot. In particular, I SSH-ed into Stretch without X-forwarding enabled, and then ran ros2 launch .... Then, when Rviz tries to start, and fails because X (X is the window manager for Linux) is inactive, the rest of the nodes are automatically exited. Are you SSH-ing into Stretch when you tried that command? If so, you can include use_rviz:=false, so Rviz doesn’t attempt to launch on the robot and instead launch Rviz on your PC.

Also, note that teleop_type:=keyboard isn’t implemented yet.

Hello Binit,
here is the new output after setting use_rviz to false:


After that the process does not exit. I think this means the offline mapping (ros2 launch stretch_nav2 offline_mapping.launch.py) is running properly?

Hi @Peiqi_Liu, yes, that’s correct. You can visualize the map as it’s being built by opening Rviz on your PC.