Skip to main content
Version: ROS 2 Jazzy

Visualization

Foxglove connects through a WebSocket and does not require ROS on the remote computer. RViz2 requires ROS 2 Jazzy and matching middleware on both computers.

Replace <robot_ip>, <robot_hostname>, <workspace>, and <namespace> in the examples with your installation's values.

Foxglove​

Enable the platform bridge in /etc/clearpath/robot.yaml:

platform:
enable_foxglove_bridge: true

Restart the service while the robot is stopped, then check the listening port:

sudo systemctl restart clearpath-robot.service
ss -tlnp | grep 8765
  • Install Foxglove on the remote computer.
  • Select Open connection, choose Foxglove WebSocket
  • Connect to ws://<robot_ip>:8765.

Add a 3D panel and select the needed topics:

DisplayTopic
Map/<namespace>/map
Global costmap/<namespace>/global_costmap/costmap
Local costmap/<namespace>/local_costmap/costmap
Front and rear scans/<namespace>/sensors/lidar2d_0/scan_filtered, /<namespace>/sensors/lidar2d_1/scan_filtered
Global plan/<namespace>/plan
MPPI trajectory/<namespace>/optimal_trajectory
SLAM graph/<namespace>/slam_toolbox/graph_visualization
Localization pose/<namespace>/amcl_pose
Navigation goal/<namespace>/goal_pose

The 3D panel's Publish tool can set /<namespace>/initialpose and /<namespace>/goal_pose. See Mapping and Navigation for the required operating modes.

RViz2​

On the remote computer, install the build tools and create a workspace:

sudo apt update
sudo apt install ros-jazzy-rviz2 python3-colcon-common-extensions python3-rosdep
source /opt/ros/jazzy/setup.bash
mkdir -p <workspace>/src
git clone --branch ros2 https://gitlab.clearpathrobotics.com/cpr-indoornav/clearpath_indoor_navigation.git \
<workspace>/src/clearpath_indoor_navigation
cd <workspace>
rosdep install --from-paths src --ignore-src -r -y
colcon build --symlink-install --packages-select clearpath_indoor_navigation

Configure either Zenoh or Cyclone DDS on both computers. For each terminal session, export the domain ID from the robot's system.ros2.domain_id, source the connector, then source the workspace:

export ROS_DOMAIN_ID=0
source <workspace>/src/clearpath_indoor_navigation/middleware/connect_robot.sh zenoh <robot_ip> <robot_hostname>
source <workspace>/install/setup.bash
ros2 launch clearpath_indoor_navigation rviz_navigation.launch.py namespace:=$ROBOT_NAMESPACE

Replace 0 with the robot's domain ID. For Cyclone DDS, replace zenoh with cyclone_dds. The connector discovers ROBOT_NAMESPACE from the robot. Use the explicit middleware argument; at the referenced revision the connector's argument handling differs from the README's interactive examples.

The supplied RViz configuration uses relative topic names and namespaced TF. Use 2D Pose Estimate to initialize localization and 2D Goal Pose to send a goal.

Launch argumentDefaultPurpose
namespaceEmptyRobot namespace
configindoor_nav2.rvizConfiguration file within the package's rviz directory
use_sim_timefalseEnable the simulation clock