From 26c1708e9dae7ab3732cd1fe382d6ef644eb6890 Mon Sep 17 00:00:00 2001 From: carpit680 Date: Sun, 22 Dec 2024 08:09:51 +0530 Subject: [PATCH] added rviz to sim file --- .../giraffe_description/launch/simulation.launch.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/giraffe_ws/src/giraffe_description/launch/simulation.launch.py b/giraffe_ws/src/giraffe_description/launch/simulation.launch.py index dc2ed2f..032b719 100644 --- a/giraffe_ws/src/giraffe_description/launch/simulation.launch.py +++ b/giraffe_ws/src/giraffe_description/launch/simulation.launch.py @@ -90,7 +90,15 @@ def generate_launch_description(): arguments=['/clock@rosgraph_msgs/msg/Clock[gz.msgs.Clock'], output='screen' ) - + rviz_base = os.path.join(get_package_share_directory("giraffe_description"), "config") + rviz_full_config = os.path.join(rviz_base, "teleop.rviz") + rviz_node_full = Node( + package="rviz2", + executable="rviz2", + name="rviz2", + output="log", + arguments=["-d", rviz_full_config], + ) return LaunchDescription([ env_var, # Launch gazebo environment @@ -119,4 +127,5 @@ def generate_launch_description(): default_value=use_sim_time, description='If true, use simulated clock'), bridge, + rviz_node_full, ])