Skip to content

Commit

Permalink
Fix RVIZ visualization and add support for virtual
Browse files Browse the repository at this point in the history
  • Loading branch information
Myzhar committed Apr 19, 2024
1 parent d728d4a commit bdc19d5
Show file tree
Hide file tree
Showing 23 changed files with 889 additions and 670 deletions.
6 changes: 3 additions & 3 deletions examples/zed_aruco_localization/config/aruco_loc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
refine_detection: false # If enabled the corners of the detected markers will be processed to obtain sub-pixel precision

debug:
active: false # Enable debug messages
active: true # Enable debug messages

marker_000:
aruco_id: 43 # ID of the ArUco tag as retrieved by the ArUco Detector code
position: [-1.08,-0.56,0.63] # Pose with respect to the World origin [m]
aruco_id: 40 # ID of the ArUco tag as retrieved by the ArUco Detector code
position: [0.0,0.0,0.0] # Pose with respect to the World origin [m]
orientation: [0.0,0.0,0.0] # Orientation with respect to the World origin [rad]

marker_001:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def launch_setup(context, *args, **kwargs):
{
'general.camera_name': camera_name_val,
'general.camera_model': camera_model_val,
'general.svo_file': svo_path,
'svo.svo_path': svo_path,
'general.serial_number': serial_number,
'pos_tracking.publish_tf': publish_tf,
'pos_tracking.publish_map_tf': publish_map_tf,
Expand Down Expand Up @@ -198,7 +198,7 @@ def generate_launch_description():
DeclareLaunchArgument(
'camera_model',
description='[REQUIRED] The model of the camera. Using a wrong camera model can disable camera features.',
choices=['zed', 'zedm', 'zed2', 'zed2i', 'zedx', 'zedxm']),
choices=['zed', 'zedm', 'zed2', 'zed2i', 'zedx', 'zedxm', 'virtual']),
DeclareLaunchArgument(
'zed_node_name',
default_value='zed_node',
Expand Down Expand Up @@ -251,7 +251,7 @@ def generate_launch_description():
DeclareLaunchArgument(
'svo_path',
default_value=TextSubstitution(text='live'),
description='Path to an input SVO file. Note: overrides the parameter `general.svo_file` in `common.yaml`.'),
description='Path to an input SVO file.'),
DeclareLaunchArgument(
'rviz',
default_value='true',
Expand Down
2 changes: 1 addition & 1 deletion examples/zed_aruco_localization/rviz2/aruco.rviz
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ Visualization Manager:
Name: Sensors
Enabled: true
Global Options:
Background Color: 48; 48; 48
Background Color: 90; 90; 90
Fixed Frame: map
Frame Rate: 30
Name: root
Expand Down
2 changes: 1 addition & 1 deletion examples/zed_depth_to_laserscan/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ The `zed_wrapper_component` variable defines the ZED node:
{
'general.camera_name': camera_name_val,
'general.camera_model': camera_model_val,
'general.svo_file': svo_path,
'svo.svo_path': svo_path,
'general.serial_number': serial_number
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def launch_setup(context, *args, **kwargs):
{
'general.camera_name': camera_name_val,
'general.camera_model': camera_model_val,
'general.svo_file': svo_path,
'svo.svo_path': svo_path,
'general.serial_number': serial_number
}
],
Expand Down Expand Up @@ -194,7 +194,7 @@ def generate_launch_description():
DeclareLaunchArgument(
'camera_model',
description='[REQUIRED] The model of the camera. Using a wrong camera model can disable camera features.',
choices=['zed', 'zedm', 'zed2', 'zed2i', 'zedx', 'zedxm']),
choices=['zed', 'zedm', 'zed2', 'zed2i', 'zedx', 'zedxm', 'virtual']),
DeclareLaunchArgument(
'zed_node_name',
default_value='zed_node',
Expand Down Expand Up @@ -223,7 +223,7 @@ def generate_launch_description():
DeclareLaunchArgument(
'svo_path',
default_value=TextSubstitution(text='live'),
description='Path to an input SVO file. Note: overrides the parameter `general.svo_file` in `common.yaml`.'),
description='Path to an input SVO file.'),
DeclareLaunchArgument(
'rviz',
default_value='true',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ Visualization Manager:
Name: Sensors
Enabled: true
Global Options:
Background Color: 48; 48; 48
Background Color: 90; 90; 90
Fixed Frame: map
Frame Rate: 30
Name: root
Expand Down
2 changes: 1 addition & 1 deletion rviz-plugin-zed-od/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Install the [zed-ros2-examples](https://github.com/stereolabs/zed-ros2-examples)

$ ros2 launch zed_display_rviz2 display_zed_cam.launch.py camera_model:=<camera_model>

Please replace `<camera_model>` with the model of the camera that you are using: `'zedm'`, `'zed2'`, `'zed2i'`, `'zedx'`, `'zedxm'`.
Please replace `<camera_model>` with the model of the camera that you are using: `'zedm'`, `'zed2'`, `'zed2i'`, `'zedx'`, `'zedxm'`, `'virtual'`.

**Note**: Object Detection and Body Tracking are not available with the "ZED" Gen.1 camera.

Expand Down
2 changes: 1 addition & 1 deletion tutorials/zed_robot_integration/rviz2/view_config.rviz
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ Visualization Manager:
Value: true
Enabled: true
Global Options:
Background Color: 48; 48; 48
Background Color: 90; 90; 90
Fixed Frame: base_link
Frame Rate: 30
Name: root
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@
<xacro:arg name="camera_name" default="zed" />
<xacro:arg name="camera_model" default="zedx" />
<xacro:arg name="use_zed_localization" default="true" />
<xacro:arg name="baseline" default="0.0" />

<!-- Include the robot (e.g. AgileX Scout mini) -->
<xacro:include filename="$(find scout_description)/urdf/scout_mini.xacro" />

<!-- Add one ZED Camera -->
<xacro:include filename="$(find zed_wrapper)/urdf/zed_macro.urdf.xacro" />
<xacro:zed_camera name="$(arg camera_name)" model="$(arg camera_model)" />
<xacro:zed_camera name="$(arg camera_name)" model="$(arg camera_model)" baseline="$(arg baseline)"/>

<!-- Add a joint to connect the ZED Camera to the robot -->
<xacro:if value="$(arg use_zed_localization)">
Expand Down
2 changes: 1 addition & 1 deletion zed_display_rviz2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Use the following launch command to start the ZED ROS2 Wrapper node and RVIZ2 wi
$ ros2 launch zed_display_rviz2 display_zed_cam.launch.py camera_model:=<camera_model>
```

Replace `<camera_model>` with the model of the camera that you are using: `'zed'`, `'zedm'`, `'zed2'`, `'zed2i'`, `'zedx'`, `'zedxm'`.
Replace `<camera_model>` with the model of the camera that you are using: `'zed'`, `'zedm'`, `'zed2'`, `'zed2i'`, `'zedx'`, `'zedxm'`, `'virtual'`.

![ZED rendering on Rviz](images/depthcloud-RGB.jpg)
![ZED rendering on Rviz](images/ZEDM-Rviz.jpg)
Expand Down
2 changes: 1 addition & 1 deletion zed_display_rviz2/launch/display_zed_cam.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def generate_launch_description():
DeclareLaunchArgument(
'camera_model',
description='[REQUIRED] The model of the camera. Using a wrong camera model can disable camera features.',
choices=['zed', 'zedm', 'zed2', 'zed2i', 'zedx', 'zedxm']),
choices=['zed', 'zedm', 'zed2', 'zed2i', 'zedx', 'zedxm', 'virtual']),
OpaqueFunction(function=launch_setup)
]
)
97 changes: 0 additions & 97 deletions zed_display_rviz2/launch/obsolete/display_zed.launch.py

This file was deleted.

98 changes: 0 additions & 98 deletions zed_display_rviz2/launch/obsolete/display_zed2.launch.py

This file was deleted.

Loading

0 comments on commit bdc19d5

Please sign in to comment.