From b2cf8dfa7b0807ae09d2dc9f492dc6799e665772 Mon Sep 17 00:00:00 2001 From: Raffaello Bonghi Date: Sun, 13 Oct 2024 18:12:40 +0100 Subject: [PATCH] Improve model and mecanum description for simulation --- .../launch/description.launch.py | 8 - nanosaur_description/launch/display.launch.py | 9 +- nanosaur_description/urdf/base.urdf.xacro | 162 +++++++++++++ .../urdf/materials.gazebo.xacro | 77 ------ nanosaur_description/urdf/materials.urdf | 31 --- nanosaur_description/urdf/mecanum.urdf.xacro | 67 ++++++ nanosaur_description/urdf/nanosaur.urdf.xacro | 15 +- .../urdf/omniwheel.urdf.xacro | 117 --------- .../urdf/properties.urdf.xacro | 28 +++ nanosaur_description/urdf/robot.urdf.xacro | 222 +++++------------- .../urdf/utilities.urdf.xacro | 64 +++++ 11 files changed, 384 insertions(+), 416 deletions(-) create mode 100644 nanosaur_description/urdf/base.urdf.xacro delete mode 100644 nanosaur_description/urdf/materials.gazebo.xacro delete mode 100644 nanosaur_description/urdf/materials.urdf create mode 100644 nanosaur_description/urdf/mecanum.urdf.xacro delete mode 100644 nanosaur_description/urdf/omniwheel.urdf.xacro create mode 100644 nanosaur_description/urdf/properties.urdf.xacro create mode 100644 nanosaur_description/urdf/utilities.urdf.xacro diff --git a/nanosaur_description/launch/description.launch.py b/nanosaur_description/launch/description.launch.py index f35fc3e..e5c118e 100644 --- a/nanosaur_description/launch/description.launch.py +++ b/nanosaur_description/launch/description.launch.py @@ -43,7 +43,6 @@ def launch_setup(context: LaunchContext, support_package): xacro_path = LaunchConfiguration('xacro_path') head_type = LaunchConfiguration('head_type') flap_type = LaunchConfiguration('flap_type') - diff_drive_emulation = LaunchConfiguration('diff_drive_emulation') use_nominal_extrinsics = LaunchConfiguration('use_nominal_extrinsics') robot_state_publisher_node = Node( @@ -56,7 +55,6 @@ def launch_setup(context: LaunchContext, support_package): 'xacro ', xacro_path, ' ', 'head_type:=', head_type, ' ', 'flap_type:=', flap_type, ' ', - 'diff_drive_emulation:=', diff_drive_emulation, ' ', 'use_nominal_extrinsics:=', use_nominal_extrinsics, ' ', ]) }] @@ -95,11 +93,6 @@ def generate_launch_description(): default_value='empty', description='Flap type to use. Options: empty, LD06.') - declare_simulation_cmd = DeclareLaunchArgument( - name='diff_drive_emulation', - default_value='false', - description='Enable urdf for differential drive emulation, for simulation.') - declare_use_nominal_extrinsics_cmd = DeclareLaunchArgument( name='use_nominal_extrinsics', default_value='false', @@ -109,7 +102,6 @@ def generate_launch_description(): ld = LaunchDescription() ld.add_action(nanosaur_cmd) ld.add_action(declare_model_path_cmd) - ld.add_action(declare_simulation_cmd) ld.add_action(declare_head_type_cmd) ld.add_action(declare_flap_type_cmd) ld.add_action(declare_use_nominal_extrinsics_cmd) diff --git a/nanosaur_description/launch/display.launch.py b/nanosaur_description/launch/display.launch.py index 1bd89b2..60f560e 100644 --- a/nanosaur_description/launch/display.launch.py +++ b/nanosaur_description/launch/display.launch.py @@ -41,7 +41,6 @@ def generate_launch_description(): gui = LaunchConfiguration('gui') head_type = LaunchConfiguration('head_type') flap_type = LaunchConfiguration('flap_type') - diff_drive_emulation = LaunchConfiguration('diff_drive_emulation') rvizconfig = LaunchConfiguration('rvizconfig') default_rviz_config_path = os.path.join(nanosaur_description_path, 'rviz', 'urdf.rviz') @@ -56,11 +55,6 @@ def generate_launch_description(): default_value='empty', description='Flap type to use. Options: empty, LD06.') - declare_simulation_cmd = DeclareLaunchArgument( - name='diff_drive_emulation', - default_value='false', - description='Enable urdf for differential drive emulation, for simulation.') - declare_gui_cmd = DeclareLaunchArgument( name='gui', default_value='True', @@ -97,7 +91,7 @@ def generate_launch_description(): # https://answers.ros.org/question/306935/ros2-include-a-launch-file-from-a-launch-file/ description_launch = IncludeLaunchDescription( PythonLaunchDescriptionSource([nanosaur_description_path, '/launch/description.launch.py']), - launch_arguments={'head_type': head_type, 'flap_type': flap_type, 'diff_drive_emulation': diff_drive_emulation}.items() + launch_arguments={'head_type': head_type, 'flap_type': flap_type}.items() ) # Define LaunchDescription variable and return it @@ -105,7 +99,6 @@ def generate_launch_description(): ld.add_action(declare_head_type_cmd) ld.add_action(declare_flap_type_cmd) - ld.add_action(declare_simulation_cmd) ld.add_action(declare_gui_cmd) ld.add_action(declare_rvizconfig_cmd) ld.add_action(description_launch) diff --git a/nanosaur_description/urdf/base.urdf.xacro b/nanosaur_description/urdf/base.urdf.xacro new file mode 100644 index 0000000..991267c --- /dev/null +++ b/nanosaur_description/urdf/base.urdf.xacro @@ -0,0 +1,162 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/nanosaur_description/urdf/materials.gazebo.xacro b/nanosaur_description/urdf/materials.gazebo.xacro deleted file mode 100644 index 28f2c2f..0000000 --- a/nanosaur_description/urdf/materials.gazebo.xacro +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - Gazebo/Green - - - - 0.0 0.5 0.0 1.0 - 0.0 0.5 0.0 1.0 - 0.0 0.5 0.0 1.0 - - - - - Gazebo/Green - - - - 0.0 0.5 0.0 1.0 - 0.0 0.5 0.0 1.0 - 0.0 0.5 0.0 1.0 - - - - - Gazebo/DarkGrey - - - - 0.2 0.2 0.2 1.0 - 0.2 0.2 0.2 1.0 - 0.2 0.2 0.2 1.0 - - - - - Gazebo/DarkGrey - - - - 0.2 0.2 0.2 1.0 - 0.2 0.2 0.2 1.0 - 0.2 0.2 0.2 1.0 - - - - - Gazebo/Green - - - - 0.0 0.5 0.0 1.0 - 0.0 0.5 0.0 1.0 - 0.0 0.5 0.0 1.0 - - - - - Gazebo/DarkGrey - - - - 0.2 0.2 0.2 1.0 - 0.2 0.2 0.2 1.0 - 0.2 0.2 0.2 1.0 - - - - - \ No newline at end of file diff --git a/nanosaur_description/urdf/materials.urdf b/nanosaur_description/urdf/materials.urdf deleted file mode 100644 index 711fcfe..0000000 --- a/nanosaur_description/urdf/materials.urdf +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/nanosaur_description/urdf/mecanum.urdf.xacro b/nanosaur_description/urdf/mecanum.urdf.xacro new file mode 100644 index 0000000..3bfef1d --- /dev/null +++ b/nanosaur_description/urdf/mecanum.urdf.xacro @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${mu} + ${mu} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/nanosaur_description/urdf/nanosaur.urdf.xacro b/nanosaur_description/urdf/nanosaur.urdf.xacro index 9ab6ebc..b97ea7f 100644 --- a/nanosaur_description/urdf/nanosaur.urdf.xacro +++ b/nanosaur_description/urdf/nanosaur.urdf.xacro @@ -4,27 +4,14 @@ - - - - - - - - - - - + use_nominal_extrinsics="$(arg use_nominal_extrinsics)" /> \ No newline at end of file diff --git a/nanosaur_description/urdf/omniwheel.urdf.xacro b/nanosaur_description/urdf/omniwheel.urdf.xacro deleted file mode 100644 index 77c01b9..0000000 --- a/nanosaur_description/urdf/omniwheel.urdf.xacro +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/nanosaur_description/urdf/properties.urdf.xacro b/nanosaur_description/urdf/properties.urdf.xacro new file mode 100644 index 0000000..5777ab0 --- /dev/null +++ b/nanosaur_description/urdf/properties.urdf.xacro @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/nanosaur_description/urdf/robot.urdf.xacro b/nanosaur_description/urdf/robot.urdf.xacro index 8d764f8..27f495a 100644 --- a/nanosaur_description/urdf/robot.urdf.xacro +++ b/nanosaur_description/urdf/robot.urdf.xacro @@ -1,188 +1,88 @@ - - - + + - + + + - - - - - - - + - - - - - - - - - - - - - - - - - - + - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + - + - + - + - + diff --git a/nanosaur_description/urdf/utilities.urdf.xacro b/nanosaur_description/urdf/utilities.urdf.xacro new file mode 100644 index 0000000..c7242c4 --- /dev/null +++ b/nanosaur_description/urdf/utilities.urdf.xacro @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file