From cde863de7760b79f4928e81766690ae415c22f68 Mon Sep 17 00:00:00 2001 From: aquintan Date: Fri, 31 Jul 2026 11:19:06 +0200 Subject: [PATCH 1/4] drone position control infrastructure update --- Launchers/position_control.launch.py | 49 ++ .../visualization/position_control.config | 115 +++++ Scenes/position_control.world | 459 ++++++++++++++++++ database/worlds.sql | 3 + 4 files changed, 626 insertions(+) create mode 100644 Launchers/position_control.launch.py create mode 100644 Launchers/visualization/position_control.config create mode 100644 Scenes/position_control.world diff --git a/Launchers/position_control.launch.py b/Launchers/position_control.launch.py new file mode 100644 index 000000000..f434f88ad --- /dev/null +++ b/Launchers/position_control.launch.py @@ -0,0 +1,49 @@ +import os + +from ament_index_python.packages import get_package_share_directory + +from launch import LaunchDescription +from launch.actions import IncludeLaunchDescription +from launch.launch_description_sources import PythonLaunchDescriptionSource +from launch_ros.actions import Node + + +def generate_launch_description(): + ros_gz_sim = get_package_share_directory("ros_gz_sim") + + world_file_name = "position_control.world" + worlds_dir = "/opt/jderobot/Scenes" + world_path = os.path.join(worlds_dir, world_file_name) + + gazebo_server = IncludeLaunchDescription( + PythonLaunchDescriptionSource( + os.path.join(ros_gz_sim, "launch", "gz_sim.launch.py") + ), + launch_arguments={ + "gz_args": ["-s -v4 ", world_path], + "on_exit_shutdown": "true", + }.items(), + ) + + world_entity_cmd = Node( + package="ros_gz_sim", + executable="create", + arguments=["-name", "world", "-file", world_path], + output="screen", + ) + + gz_ros2_bridge = Node( + package="ros_gz_bridge", + executable="parameter_bridge", + arguments=[ + "/clock@rosgraph_msgs/msg/Clock[gz.msgs.Clock", + ], + output="screen", + ) + + ld = LaunchDescription() + ld.add_action(gazebo_server) + ld.add_action(world_entity_cmd) + ld.add_action(gz_ros2_bridge) + + return ld diff --git a/Launchers/visualization/position_control.config b/Launchers/visualization/position_control.config new file mode 100644 index 000000000..782bbbe7f --- /dev/null +++ b/Launchers/visualization/position_control.config @@ -0,0 +1,115 @@ + + + + + + +