Skip to content
Open
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,13 @@ def generate_launch_description():
# Other nodes

# RViz
rviz_config = PathJoinSubstitution([FindPackageShare("realsense_gazebo"), "rviz", "realsense.rviz"])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you intend to load the RViz config this way, please make sure to install the rviz folder (e.g., in CMakeLists.txt). Otherwise, it won't be able to open by default.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Side note: this commit looks like a good candidate for a Co-authored-by tag.

rviz = Node(
package='rviz2',
executable='rviz2',
arguments=['-d', 'src/realsense_example/realsense_gazebo/rviz/realsense.rviz']
name='rviz',
output='screen',
arguments=['-d', rviz_config]
)

#####################################
Expand Down