diff --git a/nanosaur_description/launch/description.launch.py b/nanosaur_description/launch/description.launch.py index c1ae867..701dbbc 100644 --- a/nanosaur_description/launch/description.launch.py +++ b/nanosaur_description/launch/description.launch.py @@ -41,7 +41,8 @@ def launch_setup(context: LaunchContext, support_package): namespace = context.perform_substitution(support_package) xacro_path = LaunchConfiguration('xacro_path') - cover_type = LaunchConfiguration('cover_type') + head_type = LaunchConfiguration('head_type') + flap_type = LaunchConfiguration('flap_type') diff_drive_emulation = LaunchConfiguration('diff_drive_emulation') use_nominal_extrinsics = LaunchConfiguration('use_nominal_extrinsics') @@ -53,7 +54,8 @@ def launch_setup(context: LaunchContext, support_package): 'robot_description': Command( [ 'xacro ', xacro_path, ' ', - 'cover_type:=', cover_type, ' ', + 'head_type:=', head_type, ' ', + 'flap_type:=', flap_type, ' ', 'diff_drive_emulation:=', diff_drive_emulation, ' ', 'use_nominal_extrinsics:=', use_nominal_extrinsics, ' ', ]) @@ -83,10 +85,15 @@ def generate_launch_description(): default_value='nanosaur', description='nanosaur namespace name. If you are working with multiple robot you can change this namespace.') - declare_cover_type_cmd = DeclareLaunchArgument( - name='cover_type', - default_value='fisheye', - description='Cover type to use. Options: pi, fisheye, realsense, zed.') + declare_head_type_cmd = DeclareLaunchArgument( + name='head_type', + default_value='realsense', + description='Head type to use. Options: empty, Realsense, zed.') + + declare_flap_type_cmd = DeclareLaunchArgument( + name='flap_type', + default_value='empty', + description='Flap type to use. Options: empty, LD06.') declare_simulation_cmd = DeclareLaunchArgument( name='diff_drive_emulation', @@ -103,7 +110,8 @@ def generate_launch_description(): ld.add_action(nanosaur_cmd) ld.add_action(declare_model_path_cmd) ld.add_action(declare_simulation_cmd) - ld.add_action(declare_cover_type_cmd) + ld.add_action(declare_head_type_cmd) + ld.add_action(declare_flap_type_cmd) ld.add_action(declare_use_nominal_extrinsics_cmd) ld.add_action(OpaqueFunction(function=launch_setup, args=[namespace])) diff --git a/nanosaur_description/launch/display.launch.py b/nanosaur_description/launch/display.launch.py index 8babc6e..1bd89b2 100644 --- a/nanosaur_description/launch/display.launch.py +++ b/nanosaur_description/launch/display.launch.py @@ -39,16 +39,22 @@ def generate_launch_description(): nanosaur_description_path = get_package_share_directory('nanosaur_description') gui = LaunchConfiguration('gui') - cover_type = LaunchConfiguration('cover_type') + 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') - declare_cover_type_cmd = DeclareLaunchArgument( - name='cover_type', - default_value='fisheye', - description='Cover type to use. Options: pi, fisheye, realsense, zed.') + declare_head_type_cmd = DeclareLaunchArgument( + name='head_type', + default_value='realsense', + description='Head type to use. Options: empty, Realsense, zed.') + + declare_flap_type_cmd = DeclareLaunchArgument( + name='flap_type', + default_value='empty', + description='Flap type to use. Options: empty, LD06.') declare_simulation_cmd = DeclareLaunchArgument( name='diff_drive_emulation', @@ -91,13 +97,14 @@ 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={'cover_type': cover_type, 'diff_drive_emulation': diff_drive_emulation}.items() + launch_arguments={'head_type': head_type, 'flap_type': flap_type, 'diff_drive_emulation': diff_drive_emulation}.items() ) # Define LaunchDescription variable and return it ld = LaunchDescription() - ld.add_action(declare_cover_type_cmd) + 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) diff --git a/nanosaur_description/meshes/nanosaur_flap_LD06.stl b/nanosaur_description/meshes/nanosaur_flap_LD06.stl new file mode 100644 index 0000000..130ac79 Binary files /dev/null and b/nanosaur_description/meshes/nanosaur_flap_LD06.stl differ diff --git a/nanosaur_description/meshes/nanosaur_head.stl b/nanosaur_description/meshes/nanosaur_head.stl new file mode 100644 index 0000000..075f545 Binary files /dev/null and b/nanosaur_description/meshes/nanosaur_head.stl differ diff --git a/nanosaur_description/urdf/flap.urdf.xacro b/nanosaur_description/urdf/flap/flap.urdf.xacro similarity index 58% rename from nanosaur_description/urdf/flap.urdf.xacro rename to nanosaur_description/urdf/flap/flap.urdf.xacro index c03a2ac..d93caee 100644 --- a/nanosaur_description/urdf/flap.urdf.xacro +++ b/nanosaur_description/urdf/flap/flap.urdf.xacro @@ -2,22 +2,15 @@ - + - + - - - - - diff --git a/nanosaur_description/urdf/flap/flap_LD06.urdf.xacro b/nanosaur_description/urdf/flap/flap_LD06.urdf.xacro new file mode 100644 index 0000000..94c3c55 --- /dev/null +++ b/nanosaur_description/urdf/flap/flap_LD06.urdf.xacro @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/nanosaur_description/urdf/head/d435.urdf.xacro b/nanosaur_description/urdf/head/d435.urdf.xacro index 862fafd..4f0699f 100644 --- a/nanosaur_description/urdf/head/d435.urdf.xacro +++ b/nanosaur_description/urdf/head/d435.urdf.xacro @@ -72,7 +72,7 @@ aluminum peripherial evaluation case. - + diff --git a/nanosaur_description/urdf/head/head.urdf.xacro b/nanosaur_description/urdf/head/head.urdf.xacro new file mode 100644 index 0000000..be89f62 --- /dev/null +++ b/nanosaur_description/urdf/head/head.urdf.xacro @@ -0,0 +1,38 @@ + + + + + + + + + + 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 + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/nanosaur_description/urdf/head/head_realsense.urdf.xacro b/nanosaur_description/urdf/head/head_realsense.urdf.xacro new file mode 100644 index 0000000..7872ed5 --- /dev/null +++ b/nanosaur_description/urdf/head/head_realsense.urdf.xacro @@ -0,0 +1,43 @@ + + + + + + + + + + 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 + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/nanosaur_description/urdf/nanosaur.urdf.xml b/nanosaur_description/urdf/nanosaur.urdf.xml index c49758d..3e3f77e 100644 --- a/nanosaur_description/urdf/nanosaur.urdf.xml +++ b/nanosaur_description/urdf/nanosaur.urdf.xml @@ -8,7 +8,8 @@ Add extra wheel and center sprocket for differential drive simulation --> - + + @@ -21,7 +22,8 @@ - diff --git a/nanosaur_description/urdf/omniwheel.urdf.xacro b/nanosaur_description/urdf/omniwheel.urdf.xacro index c2f366f..224b9fa 100644 --- a/nanosaur_description/urdf/omniwheel.urdf.xacro +++ b/nanosaur_description/urdf/omniwheel.urdf.xacro @@ -61,7 +61,7 @@ - + diff --git a/nanosaur_description/urdf/robot.urdf.xacro b/nanosaur_description/urdf/robot.urdf.xacro index 7d3ad12..821b333 100644 --- a/nanosaur_description/urdf/robot.urdf.xacro +++ b/nanosaur_description/urdf/robot.urdf.xacro @@ -5,17 +5,19 @@ - + + + + - - + @@ -29,6 +31,13 @@ + + + + + + + @@ -57,13 +66,6 @@ - - - - - - - @@ -162,6 +164,27 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file