Skip to content

Commit 24c00a4

Browse files
rmf_visualization v2.0 (#44)
* Added publisher for human markers Signed-off-by: Yadunund <yadunund@gmail.com> * Set level and frame name through params Signed-off-by: Yadunund <yadunund@openrobotics.org> * Bbox from Obstacle Signed-off-by: Yadunund <yadunund@openrobotics.org> * Remove ObstacleData Signed-off-by: Yadunund <yadunund@gmail.com> * Skeleton for navgraph visualization Signed-off-by: Yadunund <yadunund@gmail.com> * Create sub Signed-off-by: Yadunund <yadunund@gmail.com> * Remove data struct Signed-off-by: Yadunund <yadunund@gmail.com> * Make obstacle visualizer a component Signed-off-by: Yadunund <yadunund@gmail.com> * WIP Signed-off-by: Yadunund <yadunund@openrobotics.org> * Use rmf_traffic_ros2 convert api Signed-off-by: Yadunund <yadunund@openrobotics.org> * Navgraph publishing works with map change Signed-off-by: Yadunund <yadunund@openrobotics.org> * Publish waypoint markers Signed-off-by: Yadunund <yadunund@openrobotics.org> * Add more customizable parameters Signed-off-by: Yadunund <yadunund@openrobotics.org> * Update visuals for closed and speed limited lanes Signed-off-by: Yadunund <yadunund@openrobotics.org> * Fix transparency when opening lane Signed-off-by: Yadunund <yadunund@openrobotics.org> * Be more efficient of publishing lane marker updates Signed-off-by: Yadunund <yadunund@openrobotics.org> * Remove navgraph publishing from rmf_visualization_schedule Signed-off-by: Yadunund <yadunund@openrobotics.org> * Uncrustify Signed-off-by: Yadunund <yadunund@openrobotics.org> * Added skeleton for rmf_visualization_floorplan Signed-off-by: Yadunund <yadunund@openrobotics.org> * Add to launch file Signed-off-by: Yadunund <yadunund@openrobotics.org> * Cleanup rmf_visualization_schedule Signed-off-by: Yadunund <yadunund@openrobotics.org> * Converted schedule visualizer to component Signed-off-by: Yadunund <yadunund@gmail.com> * Finished porting schedule visualizer to component Signed-off-by: Yadunund <yadunund@gmail.com> * Use correct QoS Signed-off-by: Yadunund <yadunund@openrobotics.org> * Convert to cpp package Signed-off-by: Yadunund <yadunund@openrobotics.org> * Finish implementation Signed-off-by: Yadunund <yadunund@openrobotics.org> * Remove previous implementation Signed-off-by: Yadunund <yadunund@openrobotics.org> * Make nose scale a param Signed-off-by: Yadunund <yadunund@openrobotics.org> * Fix nose scale param Signed-off-by: Yadunund <yadunund@openrobotics.org> * Add obstacle visualizer to launch Signed-off-by: Yadunund <yadunund@openrobotics.org> * Grey out closed lanes Signed-off-by: Yadunund <yadunund@openrobotics.org> * Update text size Signed-off-by: Yadunund <yadunund@openrobotics.org> * Updated CI Signed-off-by: Yadunund <yadunund@openrobotics.org> * Fix nav_msgs dep and cleanup comments Signed-off-by: Yadunund <yadunund@openrobotics.org> * Update CI Signed-off-by: Yadunund <yadunund@gmail.com> * Use unique ns for obstacles Signed-off-by: Yadunund <yadunund@openrobotics.org> * Update CI to Humble (#48) Signed-off-by: Luca Della Vedova <luca@openrobotics.org> * Update README Signed-off-by: Yadunund <yadunund@gmail.com> * Bump version and update changelogs Signed-off-by: Yadunund <yadunund@gmail.com> * Remove extra newline Signed-off-by: Yadunund <yadunund@gmail.com> Signed-off-by: Yadunund <yadunund@gmail.com> Signed-off-by: Yadunund <yadunund@openrobotics.org> Signed-off-by: Luca Della Vedova <luca@openrobotics.org> Co-authored-by: Luca Della Vedova <luca@openrobotics.org>
1 parent fb1b97a commit 24c00a4

46 files changed

Lines changed: 2706 additions & 1257 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/build.yaml‎

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,59 @@
11
name: build
2-
on: [push, pull_request]
2+
on:
3+
push:
4+
branches: [ main ]
5+
pull_request:
6+
schedule:
7+
- cron: '0 0 * * *'
8+
39
jobs:
410
build_and_test:
511
name: Build and test
6-
runs-on: ubuntu-20.04
12+
runs-on: ubuntu-latest
13+
container:
14+
image: rostooling/setup-ros-docker:ubuntu-jammy-latest
715
steps:
816
- name: deps
9-
uses: ros-tooling/setup-ros@v0.2
17+
uses: ros-tooling/setup-ros@v0.3
1018
with:
11-
required-ros-distributions: foxy
19+
required-ros-distributions: humble
20+
- name: install_clang
21+
run: sudo apt update && sudo apt install -y clang clang-tools lld
1222
- name: build
1323
uses: ros-tooling/action-ros-ci@v0.2
24+
env:
25+
CC: clang
26+
CXX: clang++
1427
with:
15-
target-ros2-distro: foxy
28+
target-ros2-distro: humble
1629
# build all packages listed in the meta package
1730
package-name: |
1831
rmf_visualization
1932
rmf_visualization_building_systems
2033
rmf_visualization_fleet_states
34+
rmf_visualization_floorplans
35+
rmf_visualization_navgraphs
36+
rmf_visualization_obstacles
2137
rmf_visualization_rviz2_plugins
2238
rmf_visualization_schedule
2339
vcs-repo-file-url: |
24-
https://raw.githubusercontent.com/open-rmf/rmf/main/rmf.repos
40+
https://raw.githubusercontent.com/open-rmf/rmf/humble-image/rmf.repos
2541
colcon-defaults: |
2642
{
2743
"build": {
28-
"mixin": ["coverage-gcc"]
44+
"mixin": ["coverage-gcc", "lld"]
2945
}
3046
}
3147
colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml
48+
- name: Upload failed test results
49+
uses: actions/upload-artifact@v2
50+
if: failure()
51+
with:
52+
name: test-results
53+
path: ros_ws/build/*/test_results/*/*.catch2.xml
3254
- name: Upload coverage to Codecov
3355
uses: codecov/codecov-action@v1
3456
with:
3557
files: ros_ws/lcov/total_coverage.info
3658
flags: tests
3759
name: lean_and_mean_codecov_bot
38-

‎.github/workflows/style.yaml‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: style
2+
on:
3+
pull_request:
4+
push:
5+
branches: [ main ]
6+
defaults:
7+
run:
8+
shell: bash
9+
jobs:
10+
linter:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
docker_image: ['ros:humble-ros-base']
15+
container:
16+
image: ${{ matrix.docker_image }}
17+
steps:
18+
- name: checkout
19+
uses: actions/checkout@v2
20+
- name: uncrustify
21+
run: |
22+
sudo apt update && sudo apt install wget
23+
wget https://raw.githubusercontent.com/open-rmf/rmf_utils/main/rmf_utils/test/format/rmf_code_style.cfg
24+
/ros_entrypoint.sh ament_uncrustify -c rmf_code_style.cfg . --language C++ --exclude rmf_visualization_schedule/include/json.hpp rmf_visualization_schedule/include/jwt/* rmf_visualization_schedule/include/jwt/*/*

‎README.md‎

Lines changed: 49 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,78 @@
1-
# rmf_schedule_visualizer
1+
# Open-RMF Visualization
22

33
![](https://github.com/open-rmf/rmf_visualization/workflows/build/badge.svg)
4+
![](https://github.com/open-rmf/rmf_visualization/workflows/style/badge.svg)
45
[![codecov](https://codecov.io/gh/open-rmf/rmf_visualization/branch/main/graph/badge.svg)](https://codecov.io/gh/open-rmf/rmf_visualization)
56

6-
This repository contains several packages that aid with visualizing various entities within RMF via RViz.
7-
* **rmf_visualization_building_systems**: to visualize the locations and states of lifts and doors in the facility.
8-
* **rmf_visualization_fleet_states**: to visualize the location of robots from various fleets.
9-
* **rmf_visualization_schedule**: to visualize the trajectories of participants in the RMF schedule database. This package also contains a websocket server that provides information on trajectories when queried.
10-
* **rmf_visualization_rviz2_plugins**: Rviz plugins for customizing the view of the participant schedules and interacting with building systems.
11-
* **rmf_visualization**: launch file to bring up the above systems
7+
![image](https://user-images.githubusercontent.com/13482049/176592672-8fdd3cd9-1e08-4370-8830-9a314b3ff776.png)
128

13-
![](docs/media/visualizer.gif)
9+
10+
This repository contains several packages that aid with visualizing various entities within RMF via RViz.
11+
* [rmf_visualization](#rmfvisualization)
12+
* [rmf_visualization_building_systems](#rmfvisualizationbuildingsystems)
13+
* [rmf_visualization_fleet_states](#rmfvisualizationfleetstates)
14+
* [rmf_visualization_floorplans](#rmfvisualizationfloorplans)
15+
* [rmf_visualization_navgraphs](#rmfvisualizationnavgraphs)
16+
* [rmf_visualization_obstacles](#rmfvisualizationobstacles)
17+
* [rmf_visualization_rviz2_plugins](#rmfvisualizationrviz2plugins)
18+
* [rmf_visualization_schedule](#rmfvisualizationschedule)
1419

1520
## Installation
1621
It is recommended to follow the instructions [here](https://github.com/open-rmf/rmf#rmf) to setup an RMF workspace with the packages in this repository along with other dependencies.
1722

18-
## Run
23+
24+
## rmf_visualization
25+
A package that contains the main [launch file](rmf_visualization/launch/visualization.launch.xml) to bringup all the visualizers. Descriptions of various configurable parameters is provided within the launch file.
1926

2027
To launch the visualizer
2128
```
2229
ros2 launch rmf_visualization visualization.launch.xml
2330
```
2431

25-
An active `rmf_traffic_schedule` node is prerequisite for the visualizer to initialize. If a schedule node is not running, it can be started with the command
26-
```
27-
ros2 run rmf_traffic_ros2 rmf_traffic_schedule
28-
```
29-
>Note: Only one instance of `rmf_traffic_schedule` must be active at any moment.
32+
## rmf_visualization_building_systems
33+
A visualizer for lifts and doors in the facility. The ROS 2 node subscribes to `DoorState` and `LiftState` ROS 2 messages published over `/door_states` and `/lift_states` topics. It then publishes RViz markers depicting the location and status of these systems over `/building_systems_markers` with `Transient Local` durability.
34+
35+
## rmf_visualization_fleet_states
36+
A visualizer for the current positions of various robot as reported by their fleet managers. The ROS 2 node subscribes to `FleetState` ROS 2 messages published over `/fleet_states`. It then publishes RViz markers depicting the location of the robots over `/fleet_markers`.
37+
38+
## rmf_visualization_floorplans
39+
A visualizer for the floorplan images for each building level. The ROS 2 node subscribes to `BuildingMap` ROS 2 messages published over `/map`. It then converts the image to an `OccupancyGrid` and publishes it over `/floorplan`.
40+
41+
## rmf_visualization_navgraphs
42+
https://user-images.githubusercontent.com/13482049/176585472-115ef57b-7792-4f02-93d3-c50a3ad70c95.mp4
3043

31-
The various packages publish MarkerArray messages over these topics:
32-
* `/map_markers` visualizes the nav graphs, waypoints and waypoint labels. Topic durability is `Transient Local`.
33-
* `/schedule_markers` visualizes planned trajectory of the robots in the rmf_schedule along with the robot vicinities.
34-
* `/fleet_markers` renders the current pose of robots as purple spheres
35-
* `/building_systems_markers` visualize the current states of doors and lifts in the facility. Topic durability is `Transient Local`.
44+
A visualizer for the navigation graphs used by each fleet of robots. Lanes that are closed are shared grey while speed limited ones have relatively narrower widths. The ROS 2 node subscribes to `Graph` ROS 2 messages published over `/nav_graphs`. It then publishes RViz markers depicting color coded lanes for each fleet over `/map_markers` with `Transient Local` durability.
3645

46+
## rmf_visualization_obstacles
47+
![image](https://user-images.githubusercontent.com/13482049/176593610-22910b40-26e6-4a02-b6f2-24bd08c5d04c.png)
48+
49+
A visualizer for obstacles detected. The ROS 2 node subscribes to `Obstacles` ROS 2 messages published over `/rmf_obstacles`. It then publishes RViz markers depicting the obstacles over `/fleet_markers` with `Transient Local` durability.
50+
51+
## rmf_visualization_rviz2_plugins
3752
![](docs/media/developer_panels.png)
53+
This package provides several RViz panels to update the view and submit requests to Open-RMF.
3854

55+
### RMFSchedulePanel
3956
For a given `map_name`, the `rmf_visualization_schedule_data_node` queries for trajectories in the RMF schedule database over a duration that is specified by `start_duration` and `query_duration` parameters.
4057
The expected location and vicinity of a participant are visualized with concentric yellow and blue circles respectively.
4158
The expected trajectory for a participant is a green polyline when conflict-free and is red otherwise.
4259
The `SchedulePanel` in RViz allows users to modify the parameters used to query trajectories in the schedule database.
60+
### Door and Lift panels
4361
`Door` and `Lift` panels allow users to interact with these systems respectively.
4462
The `rmf.rviz` file is used to save the configuration of RViz along with default values of parameters used in the different panels.
4563

64+
## rmf_visualization_schedule
65+
![](docs/media/visualizer.gif)
66+
67+
A visualizer of the predicted schedule of robots as submitted by fleet adapters to the RMF Schedule Database. The ROS 2 node spawns a `Mirror` of the RMF Schedule Database which is queries before publishing markers depicting the trajectory of robots as green line strips to `/schedule_markers`. The `footprint` and `vicinity` of each robot is represented by yellow and cyan cylindrical markers respectively.
68+
69+
An active `rmf_traffic_schedule` node is prerequisite for the visualizer to initialize. If a schedule node is not running, it can be started with the command
70+
```
71+
ros2 run rmf_traffic_ros2 rmf_traffic_schedule
72+
```
73+
>Note: Only one instance of `rmf_traffic_schedule` must be active at any moment.
74+
75+
4676
## Websocket Server for Custom UIs
4777
For developers looking to create custom UIs outside of the ROS2 environment, this repository provides a websocket server to exchange information contained in an active rmf schedule database. This may primarily be used to query for robot trajectories in the schedule along with conflict information if any. The format for various requests and corresponding responses are described below.
4878

‎rmf_visualization/CHANGELOG.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
## Changelog for package rmf_visualization
22

3+
2.0.0 (2022-09-09)
4+
------------------
5+
* Update launch file to bringup navgraph, floorplan and obstacle visualizers: [#44](https://github.com/open-rmf/rmf_visualization/pull/44)
6+
37
1.2.1 (2021-09-01)
48
------------------
59
* Fix style checking in CI: [#37](https://github.com/open-rmf/rmf_visualization/pull/37)

‎rmf_visualization/launch/visualization.launch.xml‎

Lines changed: 45 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,66 @@
33
<launch>
44

55
<arg name="use_sim_time" default="false"/>
6-
<arg name="rate" default="10"/>
7-
<arg name="map_name" default="B1"/>
6+
<arg name="rate" default="10.0" description= "The rate in hz at which the scheduler markers should publish"/>
7+
<arg name="map_name" default="B1" description="The name of the map to initialize the visualizer"/>
88
<arg name="viz_config_file" default="$(find-pkg-share rmf_visualization_schedule)/config/rmf.rviz"/>
99
<arg name="display_names" default="true"/>
1010
<arg name="websocket_port" default="8006"/>
1111
<arg name="headless" default="false" description="Do not launch rviz2"/>
12+
<arg name="path_width" default="0.2" description="Width of schedule path(m) to be rendered"/>
13+
<arg name="lane_width" default="0.5" description="Width of lanes(m) to be rendered"/>
14+
<arg name="waypoint_scale" default="1.3" description="The relative size of a waypoint wrt the lane width"/>
15+
<arg name="text_scale" default="0.7" description="The relative size of a text label wrt the lane width"/>
16+
<arg name="lane_transparency" default="0.6" description="The transparency of a rendered lane in default state"/>
17+
<arg name="wait_secs" default="10" description="The nummber of seconds the schedule visualizer should keep trying to connect to the rmf_schedule_node"/>
18+
<arg name="retained_history_count" default="50" description="The retained history count for negotiations"/>
19+
<arg name="fleet_state_nose_scale" default="0.5" description="The radius of the nose marker as a fraction of the fleet's footprint radius"/>
20+
<arg name="rmf_frame_id" default="map" description="The RMF global frame id"/>
1221

1322
<group>
14-
<node pkg="rmf_visualization_schedule" exec="schedule_visualizer" args="-r $(var rate) -m $(var map_name) -p $(var websocket_port) --history 50">
23+
<node pkg="rmf_visualization_schedule" exec="schedule_visualizer_node">
1524
<param name="use_sim_time" value="$(var use_sim_time)"/>
25+
<param name="rate" value="$(var rate)"/>
26+
<param name="path_width" value="$(var path_width)"/>
27+
<param name="initial_map_name" value="$(var map_name)"/>
28+
<param name="wait_secs" value="$(var wait_secs)"/>
29+
<param name="port" value="$(var websocket_port)"/>
30+
<param name="retained_history_count" value="$(var retained_history_count)"/>
1631
</node>
1732

18-
<node pkg="rmf_visualization_fleet_states" exec="rmf_visualization_fleet_states" args="-m $(var map_name)">
19-
<param name="display_names" value ="$(var display_names)"/>
33+
<node pkg="rmf_visualization_fleet_states" exec="fleetstates_visualizer_node">
2034
<param name="use_sim_time" value="$(var use_sim_time)"/>
35+
<param name="fleet_state_nose_scale" value="$(var fleet_state_nose_scale)"/>
36+
<!-- Radius parameters for fleets available in rmf_demos -->
37+
<param name="tinyRobot_radius" value="0.3"/>
38+
<param name="deliveryRobot_radius" value="0.6"/>
39+
<param name="cleanerBotA_radius" value="1.0"/>
40+
<param name="cleanerBotE_radius" value="1.0"/>
41+
<param name="caddy_radius" value="1.5"/>
2142
</node>
2243

2344
<node pkg="rmf_visualization_building_systems" exec="rmf_visualization_building_systems" args="-m $(var map_name)">
2445
<param name="use_sim_time" value="$(var use_sim_time)"/>
46+
</node>
47+
48+
<node pkg="rmf_visualization_navgraphs" exec="navgraph_visualizer_node">
49+
<param name="use_sim_time" value="$(var use_sim_time)"/>
50+
<param name="initial_map_name" value="$(var map_name)"/>
51+
<param name="lane_width" value="$(var lane_width)"/>
52+
<param name="waypoint_scale" value="$(var waypoint_scale)"/>
53+
<param name="text_scale" value="$(var text_scale)"/>
54+
<param name="lane_transparency" value="$(var lane_transparency)"/>
55+
</node>
56+
57+
<node pkg="rmf_visualization_floorplans" exec="floorplan_visualizer_node">
58+
<param name="use_sim_time" value="$(var use_sim_time)"/>
59+
<param name="initial_map_name" value="$(var map_name)"/>
60+
</node>
61+
62+
<node pkg="rmf_visualization_obstacles" exec="obstacle_visualizer_node">
2563
<param name="use_sim_time" value="$(var use_sim_time)"/>
64+
<param name="initial_map_name" value="$(var map_name)"/>
65+
<param name="global_fixed_frame" value="$(var rmf_frame_id)"/>
2666
</node>
2767
</group>
2868

‎rmf_visualization/package.xml‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
33
<package format="3">
44
<name>rmf_visualization</name>
5-
<version>1.3.0</version>
5+
<version>2.0.0</version>
66
<description>Package containing a single launch file to bringup various visualizations</description>
77
<maintainer email="yadunund@openrobotics.org">Yadunund</maintainer>
88
<maintainer email="marco@openrobotics.org">Marco A. Gutiérrez</maintainer>
@@ -13,6 +13,9 @@
1313
<exec_depend>rmf_visualization_schedule</exec_depend>
1414
<exec_depend>rmf_visualization_fleet_states</exec_depend>
1515
<exec_depend>rmf_visualization_building_systems</exec_depend>
16+
<exec_depend>rmf_visualization_navgraphs</exec_depend>
17+
<exec_depend>rmf_visualization_floorplans</exec_depend>
18+
<exec_depend>rmf_visualization_obstacles</exec_depend>
1619
<exec_depend>rmf_visualization_rviz2_plugins</exec_depend>
1720
<exec_depend>launch_xml</exec_depend>
1821

‎rmf_visualization_building_systems/CHANGELOG.md‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
## Changelog for package rmf_visualization_building_systems
22

3+
2.0.0 (2022-09-09)
4+
------------------
5+
36
1.2.1 (2021-09-01)
47
------------------
58
* Fix style checking in CI: [#37](https://github.com/open-rmf/rmf_visualization/pull/37)
@@ -17,5 +20,5 @@
1720

1821
1.0.0 (2020-06-22)
1922
------------------
20-
* A ROS 2 node that publishers RViz markers to visualize the states of doors and elevators as defined in the `building_map::msgs::BuildingMap` message.
23+
* A ROS 2 node that publishers RViz markers to visualize the states of doors and elevators as defined in the `building_map::msgs::BuildingMap` message.
2124
* Contributors: Chen Bainian, Yadu

‎rmf_visualization_building_systems/package.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
33
<package format="3">
44
<name>rmf_visualization_building_systems</name>
5-
<version>1.3.0</version>
5+
<version>2.0.0</version>
66
<description>A visualizer for doors and lifts</description>
77
<maintainer email="yadunund@openrobotics.org">Yadunund</maintainer>
88
<maintainer email="marco@openrobotics.org">Marco A. Gutiérrez</maintainer>

‎rmf_visualization_fleet_states/CHANGELOG.md‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
## Changelog for package rmf_visualization_fleet_states
22

3+
2.0.0 (2022-09-09)
4+
------------------
5+
* Update to ROS 2 component: [#44](https://github.com/open-rmf/rmf_visualization/pull/44)
6+
37
1.2.1 (2021-09-01)
48
------------------
59
* Fix style checking in CI: [#37](https://github.com/open-rmf/rmf_visualization/pull/37)
610
* Contributors: Grey
7-
11+
812
1.2.0 (2021-06-14)
913
------------------
1014
* Renamed package to `rmf_visualization_fleet_states`: [#8](https://github.com/open-rmf/rmf_visualization/pull/8)

0 commit comments

Comments
 (0)