From 00f50f5b7c681615fa6d9f91291c2ba99b85c147 Mon Sep 17 00:00:00 2001 From: rafal-gorecki Date: Thu, 9 May 2024 11:24:51 +0200 Subject: [PATCH] Suggestions --- README.md | 21 +-- package.xml | 25 +--- test/component.urdf.xacro | 2 - urdf/intel_realsense_d435.urdf.xacro | 193 ++++++++++++------------- urdf/orbbec_astra.urdf.xacro | 6 +- urdf/ouster_os1_32.urdf.xacro | 4 + urdf/slamtec_rplidar_s1.urdf.xacro | 2 +- urdf/stereolabs_zed.urdf.xacro | 206 +++++++++++++-------------- 8 files changed, 207 insertions(+), 252 deletions(-) diff --git a/README.md b/README.md index 54538a9..de8404d 100644 --- a/README.md +++ b/README.md @@ -15,12 +15,6 @@ git clone https://github.com/husarion/ros_components_description.git src/ros_com # in case the package will be used within simulation export HUSARION_ROS_BUILD_TYPE=simulation -# to specify which simulation engine will be used -# for gazebo classic -export SIMULATION_ENGINE=gazebo-classic -# for ignition gazebo -export SIMULATION_ENGINE=ignition-gazebo - rosdep update --rosdistro $ROS_DISTRO rosdep install -i --from-path src --rosdistro $ROS_DISTRO -y colcon build @@ -36,9 +30,7 @@ To include the sensor, use the following code: + rpy="0.0 0.0 0.0" /> ``` A list of parameters can be found here: @@ -46,12 +38,9 @@ A list of parameters can be found here: - `parent_link` [*string*, default: **None**] parent link to which sensor should be attached. - `xyz` [*float list*, default: **None**] 3 float values defining translation between base of a sensor and parent link. Values in **m**. - `rpy` [*float list*, default: **None**] 3 float values define rotation between parent link and base of a sensor. Values in **rad**. -- `tf_prefix` [*string*, optional] tf prefix applied before all links created by sensor. If defined, applies `_`. If not defined, leaves `` intact. Applies also to `frame_id` parameter. -- `topic` [*string*, default: **same as manufacturer's default**] name of topic at which simulated sensor will publish data. -- `frame_id` [*string*, default: **same as manufacturer's default**] name of final tf to which sensor will be attached. Should match one from message published by sensor. -- `use_gpu` [*bool*, default: **false**] enable GPU acceleration for sensor. Available only if sensor can be accelerated. -- `simulation_engine` [*string*, default: **gazebo-classic**] selected for which simulation engine plugins should be loaded. Currently the only supported: - - **gazebo-classic** used to select [Gazebo Classic](https://classic.gazebosim.org/). - - **ignition-gazebo** used to select [Ignition Gazebo](https://gazebosim.org/home). +- `namespace` [*string*, default: **None**] global namespace common to the entire robot. +- `device_namespace` [*string*, default: **None**] local namespace allowing to distinguish two identical devices from each other. + +- `model` [*string*, default: **None**] model argument that appears when you want to load the appropriate model from a given manufacturer. Some sensors can define their specific parameters. Refer to their definition for more info. diff --git a/package.xml b/package.xml index aefb6fb..1fabc45 100644 --- a/package.xml +++ b/package.xml @@ -21,26 +21,11 @@ urdf xacro - - gazebo_plugins - - - - ros_gz_sim - - - - ros_gz_bridge - - - - launch - - - - nav2_common - - + ros_gz_sim + ros_gz_bridge + launch + nav2_common + ament_index_python ament_python_pytest python-yaml diff --git a/test/component.urdf.xacro b/test/component.urdf.xacro index 42d211c..abcd233 100644 --- a/test/component.urdf.xacro +++ b/test/component.urdf.xacro @@ -10,8 +10,6 @@ diff --git a/urdf/intel_realsense_d435.urdf.xacro b/urdf/intel_realsense_d435.urdf.xacro index 743fe5a..9ad4887 100644 --- a/urdf/intel_realsense_d435.urdf.xacro +++ b/urdf/intel_realsense_d435.urdf.xacro @@ -20,12 +20,10 @@ + device_namespace:=camera"> @@ -34,13 +32,6 @@ - - - - - - - @@ -70,22 +61,22 @@ - + - + - + - + - - + + - + @@ -112,132 +103,130 @@ published. e.g. running the device in simulation --> - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - - - - - - true - 30.0 - - ${ns}${topic}/color/image_raw - false - - ${prefix}${name}_color_optical_frame - ${69.0/180.0*pi} + + + + + true + 30.0 + + ${ns}${topic}/color/image_raw + false + + ${device_namespace}_color_optical_frame + ${69.0/180.0*pi} + + 1280 + 720 + R8G8B8 + + + 0.02 + 300.0 + + + ${ns}${device_namespace} + + + + + true + 30.0 + + ${ns}${topic}/depth/image_rect_raw + false + + ${device_namespace}_depth_optical_frame + + ${87.0/180.0*pi} 1280 720 - R8G8B8 + R_FLOAT32 - 0.02 - 300.0 + 0.28 + 8.0 - - ${ns} - - - - - true - 30.0 - - ${ns}${topic}/depth/image_rect_raw - false - - ${prefix}${name}_depth_optical_frame - - ${87.0/180.0*pi} - - 1280 - 720 - R_FLOAT32 - - - 0.28 - 8.0 - - - gaussian - 0.0 - 0.005 - - - - ${ns} - - - - + + gaussian + 0.0 + 0.005 + + + + ${ns}${device_namespace} + + + diff --git a/urdf/orbbec_astra.urdf.xacro b/urdf/orbbec_astra.urdf.xacro index 605a7c4..2031595 100644 --- a/urdf/orbbec_astra.urdf.xacro +++ b/urdf/orbbec_astra.urdf.xacro @@ -2,8 +2,8 @@ + namespace:=None + device_namespace:=camera"> @@ -143,7 +143,7 @@ - ${ns} + ${ns}${device_namespace} diff --git a/urdf/ouster_os1_32.urdf.xacro b/urdf/ouster_os1_32.urdf.xacro index 45056ce..ac11d7d 100644 --- a/urdf/ouster_os1_32.urdf.xacro +++ b/urdf/ouster_os1_32.urdf.xacro @@ -104,6 +104,10 @@ ${ns}${prefix}os_lidar true + + ${ns}${device_ns} + + diff --git a/urdf/slamtec_rplidar_s1.urdf.xacro b/urdf/slamtec_rplidar_s1.urdf.xacro index ae53dd1..9d5401d 100644 --- a/urdf/slamtec_rplidar_s1.urdf.xacro +++ b/urdf/slamtec_rplidar_s1.urdf.xacro @@ -79,7 +79,7 @@ ${ns}${device_ns}scan - {ns}${prefix}laser + ${ns}${prefix}laser ${ns}${prefix}laser 10.0 diff --git a/urdf/stereolabs_zed.urdf.xacro b/urdf/stereolabs_zed.urdf.xacro index 7958b36..7168733 100644 --- a/urdf/stereolabs_zed.urdf.xacro +++ b/urdf/stereolabs_zed.urdf.xacro @@ -23,8 +23,7 @@ params="parent_link xyz rpy model:=zed namespace:=None - device_namespace:=None - "> + device_namespace:=zed"> @@ -33,13 +32,6 @@ - - - - - - - @@ -90,15 +82,15 @@ - - + + - + - + @@ -114,135 +106,133 @@ - - - + + + - - - - + + + + - - - - + + + + - - + + - - + + - - - - + + + + - - + + - - + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - - true - 30.0 - - ${ns}${prefix}camera/zed_node/rgb/image_rect_color - false - - ${prefix}camera_center_optical_frame - - ${110.0/180.0*pi} - - 1920 - 1080 - R8G8B8 - - - 0.02 - 300.0 - - - - ${ns} - - - - - true - 30.0 - - ${ns}${prefix}camera/zed_node/depth - false - - ${prefix}camera_center_optical_frame - - ${110.0/180.0*pi} - - 1920 - 1080 - R_FLOAT32 - - - 0.3 - 20.0 - - - 0.0 - 0.03 - - - - ${ns} - - - - + + + + true + 30.0 + + ${ns}${device_namespace}/zed_node/rgb/image_rect_color + false + + ${device_namespace}_center_optical_frame + + ${110.0/180.0*pi} + + 1920 + 1080 + R8G8B8 + + + 0.02 + 300.0 + + + + ${ns} + + + + + true + 30.0 + + ${ns}${device_namespace}/zed_node/depth + false + + ${device_namespace}_center_optical_frame + + ${110.0/180.0*pi} + + 1920 + 1080 + R_FLOAT32 + + + 0.3 + 20.0 + + + 0.0 + 0.03 + + + + ${ns}${device_namespace} + + +