Skip to content

Commit

Permalink
Log environment variables with which gazebo was launched
Browse files Browse the repository at this point in the history
This can be useful for debugging scenarios where we want to debug why a simulation is not loading the correct files.

Signed-off-by: Arjo Chakravarty <[email protected]>
  • Loading branch information
arjo129 authored Jan 2, 2025
1 parent 550ef7b commit dd06c40
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ros_gz_sim/launch/gz_sim.launch.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ from ros2pkg.api import get_package_names
from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument, OpaqueFunction
from launch.actions import ExecuteProcess, Shutdown
from launch.actions import LogInfo
from launch.substitutions import LaunchConfiguration

# Copied from https://github.com/ros-simulation/gazebo_ros_pkgs/blob/79fd94c6da76781a91499bc0f54b70560b90a9d2/gazebo_ros/scripts/gazebo_ros_paths.py
Expand Down Expand Up @@ -126,7 +127,9 @@ def launch_gz(context, *args, **kwargs):
else:
on_exit = None

return [ExecuteProcess(
return [
LogInfo(f"Launching gazebo with the environment variables: {env}"),
ExecuteProcess(
cmd=[exec, exec_args, '--force-version', gz_version],
name='gazebo',
output='screen',
Expand Down

0 comments on commit dd06c40

Please sign in to comment.