From d859a69b5b3cee9613e181b007bb9119c084e60e Mon Sep 17 00:00:00 2001 From: Jan Hernas Date: Mon, 2 Oct 2023 12:53:40 +0200 Subject: [PATCH 01/14] Add enviormental variable hooks --- leo_description/CMakeLists.txt | 3 +++ leo_description/hooks/leo_description.dsv.in | 1 + leo_description/hooks/leo_description.sh.in | 1 + 3 files changed, 5 insertions(+) create mode 100644 leo_description/hooks/leo_description.dsv.in create mode 100644 leo_description/hooks/leo_description.sh.in diff --git a/leo_description/CMakeLists.txt b/leo_description/CMakeLists.txt index 0861db0..cab1b84 100644 --- a/leo_description/CMakeLists.txt +++ b/leo_description/CMakeLists.txt @@ -12,4 +12,7 @@ install( DESTINATION share/${PROJECT_NAME} ) +ament_environment_hooks("${CMAKE_CURRENT_SOURCE_DIR}/hooks/${PROJECT_NAME}.dsv.in") +ament_environment_hooks("${CMAKE_CURRENT_SOURCE_DIR}/hooks/${PROJECT_NAME}.sh.in") + ament_package() diff --git a/leo_description/hooks/leo_description.dsv.in b/leo_description/hooks/leo_description.dsv.in new file mode 100644 index 0000000..2a38ccc --- /dev/null +++ b/leo_description/hooks/leo_description.dsv.in @@ -0,0 +1 @@ +prepend-non-duplicate;IGN_GAZEBO_RESOURCE_PATH;share;@CMAKE_INSTALL_PREFIX@/share \ No newline at end of file diff --git a/leo_description/hooks/leo_description.sh.in b/leo_description/hooks/leo_description.sh.in new file mode 100644 index 0000000..33fa6b2 --- /dev/null +++ b/leo_description/hooks/leo_description.sh.in @@ -0,0 +1 @@ +ament_prepend_unique_value IGN_GAZEBO_RESOURCE_PATH "$AMENT_CURRENT_PREFIX/share/@PROJECT_NAME@/models" \ No newline at end of file From 1800dc788fdb5cce78a354ac482511709f5219eb Mon Sep 17 00:00:00 2001 From: Jan Hernas Date: Mon, 2 Oct 2023 12:54:22 +0200 Subject: [PATCH 02/14] Adjust simulation xacro for new simulation --- leo_description/urdf/macros.xacro | 181 ++++++++++++++++++++++-------- 1 file changed, 134 insertions(+), 47 deletions(-) diff --git a/leo_description/urdf/macros.xacro b/leo_description/urdf/macros.xacro index 61e0d27..d5b3c5e 100644 --- a/leo_description/urdf/macros.xacro +++ b/leo_description/urdf/macros.xacro @@ -231,7 +231,8 @@ + params="robot_ns:='' + joint_prefix:=''"> @@ -310,65 +311,75 @@ - - true - 30.0 - false - - 1.9 - - 640 - 480 - R8G8B8 - - - 0.02 - 300 - - - gaussian - 0.0 - 0.007 - - - -0.279817 - 0.060321 - 0.000487 - 0.000310 - 0.000000 -
0.5 0.5
-
-
- - ${robot_ns} - camera_optical_frame - + + + 1.9 + + 640 + 480 + R8G8B8 + + + 0.2 + 300 + + + gaussian + 0.0 + 0.007 + + + -0.279817 + 0.060321 + 0.000487 + 0.000310 + 0.000000 +
0.5 0.5
+
+
+ 1 + 30 + true + camera/image_raw + ${link_prefix}camera_frame
- + rocker_L_joint rocker_R_joint 100.0 + + + + + + 100 - - ${robot_ns} - imu/data_raw - ${link_prefix}imu_frame - 100.0 - 0.01 - false - + true + imu/data_raw + 1 + ${link_prefix}imu_frame - + - + + + wheel_FL_joint + wheel_FR_joint + wheel_RL_joint + wheel_RR_joint + 0.358 + 0.0625 + odom + ${link_prefix}base_footprint + 20 + cmd_vel + 2.5 + 3 + -2.5 + -3 + + - +
Date: Tue, 10 Oct 2023 10:39:39 +0200 Subject: [PATCH 03/14] Macros.xacro cleanup --- leo_description/urdf/macros.xacro | 152 ++++-------------------------- 1 file changed, 18 insertions(+), 134 deletions(-) diff --git a/leo_description/urdf/macros.xacro b/leo_description/urdf/macros.xacro index d5b3c5e..50c22f6 100644 --- a/leo_description/urdf/macros.xacro +++ b/leo_description/urdf/macros.xacro @@ -311,8 +311,8 @@ - - + + 1.9 640 @@ -340,7 +340,7 @@ 1 30 true - camera/image_raw + ${link_prefix}camera/image_raw ${link_prefix}camera_frame @@ -359,159 +359,39 @@ filename="ignition-gazebo-joint-state-publisher-system" name="ignition::gazebo::systems::JointStatePublisher"> - - + 100 true - imu/data_raw + ${link_prefix}imu/data_raw 1 ${link_prefix}imu_frame - - - wheel_FL_joint - wheel_FR_joint - wheel_RL_joint - wheel_RR_joint + ${joint_prefix}wheel_FL_joint + ${joint_prefix}wheel_FR_joint + ${joint_prefix}wheel_RL_joint + ${joint_prefix}wheel_RR_joint 0.358 0.0625 odom ${link_prefix}base_footprint 20 - cmd_vel + ${link_prefix}cmd_vel + ${link_prefix}odom + ${link_prefix}tf 2.5 3 -2.5 -3 - - - - + + + link_prefix="${link_prefix}" + joint_prefix="${joint_prefix}"/> - + From a2726c10f665e65a884af9a70523055f6dc07451 Mon Sep 17 00:00:00 2001 From: Jan Hernas Date: Tue, 10 Oct 2023 13:34:41 +0200 Subject: [PATCH 04/14] Addd surface element to wheels --- leo_description/urdf/macros.xacro | 89 +++++++++++++++++++++---------- 1 file changed, 61 insertions(+), 28 deletions(-) diff --git a/leo_description/urdf/macros.xacro b/leo_description/urdf/macros.xacro index 50c22f6..2eb44d3 100644 --- a/leo_description/urdf/macros.xacro +++ b/leo_description/urdf/macros.xacro @@ -243,7 +243,7 @@ 1e6 1.0 - 0.3 + 0.3 0.3 0.003 @@ -251,7 +251,7 @@ 1e6 1.0 - 0.3 + 0.3 0.3 0.003 @@ -260,7 +260,7 @@ 1e6 1.0 - 0.3 + 0.3 0.3 0.003 @@ -268,45 +268,77 @@ 1e6 1.0 - 0.3 + 0.3 0.3 0.003 - 1e6 - 100.0 - 3.0 - 1.0 - 1 0 0 - 0.003 + + + + 3.0 + 1.0 + 1 0 0 + + + 1 + 1 + 0.1 + + + - 1e6 - 100.0 - 3.0 - 1.0 - 1 0 0 - 0.003 + + + + 3.0 + 1.0 + 1 0 0 + + + 1 + 1 + 0.1 + + + - 1e6 - 100.0 - 3.0 - 1.0 - 1 0 0 - 0.003 + + + + 3.0 + 1.0 + 1 0 0 + + + 1 + 1 + 0.1 + + + - 1e6 - 100.0 - 3.0 - 1.0 - 1 0 0 - 0.003 + + + + 3.0 + 1.0 + 1 0 0 + + + 1 + 1 + 0.1 + + + @@ -371,6 +403,7 @@ + From e0afce678ec0f833c1085b924dfc174594723dfc Mon Sep 17 00:00:00 2001 From: Jan Hernas Date: Wed, 11 Oct 2023 14:29:07 +0200 Subject: [PATCH 05/14] Add custom topic name for joint state plugin --- leo_description/urdf/macros.xacro | 1 + 1 file changed, 1 insertion(+) diff --git a/leo_description/urdf/macros.xacro b/leo_description/urdf/macros.xacro index 2eb44d3..5aab947 100644 --- a/leo_description/urdf/macros.xacro +++ b/leo_description/urdf/macros.xacro @@ -390,6 +390,7 @@ + ${link_prefix}joint_states From 0412c6edac55f85d6697eb2969a79c882cc8b24b Mon Sep 17 00:00:00 2001 From: Jan Hernas Date: Fri, 13 Oct 2023 10:43:21 +0200 Subject: [PATCH 06/14] Fix gazebo launch warnings --- leo_description/urdf/macros.xacro | 200 ++++++++++++++++++------------ 1 file changed, 124 insertions(+), 76 deletions(-) diff --git a/leo_description/urdf/macros.xacro b/leo_description/urdf/macros.xacro index 5aab947..e1a45a5 100644 --- a/leo_description/urdf/macros.xacro +++ b/leo_description/urdf/macros.xacro @@ -241,104 +241,152 @@ - 1e6 - 1.0 - 0.3 - 0.3 - 0.003 + + + + + 0.3 + 0.3 + + + 1 + 1 + 0.1 + + + + - 1e6 - 1.0 - 0.3 - 0.3 - 0.003 + + + + + 0.3 + 0.3 + + + 1 + 1 + 0.1 + + + + - 1e6 - 1.0 - 0.3 - 0.3 - 0.003 + + + + + 0.3 + 0.3 + + + 1 + 1 + 0.1 + + + + - 1e6 - 1.0 - 0.3 - 0.3 - 0.003 + + + + + 0.3 + 0.3 + + + 1 + 1 + 0.1 + + + + - - - - 3.0 - 1.0 - 1 0 0 - - - 1 - 1 - 0.1 - - - + + + + + 1.0 + 1.0 + 0 0 0 + + + 1 + 1 + 0.1 + + + + - - - - 3.0 - 1.0 - 1 0 0 - - - 1 - 1 - 0.1 - - - + + + + + 1.0 + 1.0 + 0 0 0 + + + 1 + 1 + 0.1 + + + + - - - - 3.0 - 1.0 - 1 0 0 - - - 1 - 1 - 0.1 - - - + + + + + 1.0 + 1.0 + 0 0 0 + + + 1 + 1 + 0.1 + + + + - - - - 3.0 - 1.0 - 1 0 0 - - - 1 - 1 - 0.1 - - - + + + + + 1.0 + 1.0 + 0 0 0 + + + 1 + 1 + 0.1 + + + + From 4846f848fde6f29714f6f212240568f60f9eff21 Mon Sep 17 00:00:00 2001 From: Jan Hernas Date: Fri, 13 Oct 2023 11:04:18 +0200 Subject: [PATCH 07/14] Change bullet parameters --- leo_description/urdf/macros.xacro | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/leo_description/urdf/macros.xacro b/leo_description/urdf/macros.xacro index e1a45a5..75fb9fa 100644 --- a/leo_description/urdf/macros.xacro +++ b/leo_description/urdf/macros.xacro @@ -249,8 +249,8 @@ 0.3 - 1 - 1 + 0.3 + 0.3 0.1 @@ -267,8 +267,8 @@ 0.3 - 1 - 1 + 0.3 + 0.3 0.1 @@ -286,8 +286,8 @@ 0.3 - 1 - 1 + 0.3 + 0.3 0.1 @@ -304,8 +304,8 @@ 0.3 - 1 - 1 + 0.3 + 0.3 0.1 From 289bc18b91cfc523b25ad34e348c1867f39a9aee Mon Sep 17 00:00:00 2001 From: Jan Hernas Date: Tue, 17 Oct 2023 11:26:58 +0200 Subject: [PATCH 08/14] Update diff system plugin name --- leo_description/urdf/macros.xacro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/leo_description/urdf/macros.xacro b/leo_description/urdf/macros.xacro index 75fb9fa..d7e8638 100644 --- a/leo_description/urdf/macros.xacro +++ b/leo_description/urdf/macros.xacro @@ -427,7 +427,7 @@ - + rocker_L_joint rocker_R_joint 100.0 From 51449746a00a8f6da27b0a2ea8ea97614d383ef2 Mon Sep 17 00:00:00 2001 From: Jan Hernas Date: Tue, 17 Oct 2023 12:06:48 +0200 Subject: [PATCH 09/14] Update enviormental hooks --- leo_description/CMakeLists.txt | 3 +-- leo_description/hooks/gz_sim_resource_path.dsv | 1 + leo_description/hooks/leo_description.dsv.in | 1 - leo_description/hooks/leo_description.sh.in | 1 - 4 files changed, 2 insertions(+), 4 deletions(-) create mode 100644 leo_description/hooks/gz_sim_resource_path.dsv delete mode 100644 leo_description/hooks/leo_description.dsv.in delete mode 100644 leo_description/hooks/leo_description.sh.in diff --git a/leo_description/CMakeLists.txt b/leo_description/CMakeLists.txt index cab1b84..31ea79f 100644 --- a/leo_description/CMakeLists.txt +++ b/leo_description/CMakeLists.txt @@ -12,7 +12,6 @@ install( DESTINATION share/${PROJECT_NAME} ) -ament_environment_hooks("${CMAKE_CURRENT_SOURCE_DIR}/hooks/${PROJECT_NAME}.dsv.in") -ament_environment_hooks("${CMAKE_CURRENT_SOURCE_DIR}/hooks/${PROJECT_NAME}.sh.in") +ament_environment_hooks("${CMAKE_CURRENT_SOURCE_DIR}/hooks/gz_sim_resource_path.dsv") ament_package() diff --git a/leo_description/hooks/gz_sim_resource_path.dsv b/leo_description/hooks/gz_sim_resource_path.dsv new file mode 100644 index 0000000..4426101 --- /dev/null +++ b/leo_description/hooks/gz_sim_resource_path.dsv @@ -0,0 +1 @@ +prepend-non-duplicate;IGN_GAZEBO_RESOURCE_PATH;share; \ No newline at end of file diff --git a/leo_description/hooks/leo_description.dsv.in b/leo_description/hooks/leo_description.dsv.in deleted file mode 100644 index 2a38ccc..0000000 --- a/leo_description/hooks/leo_description.dsv.in +++ /dev/null @@ -1 +0,0 @@ -prepend-non-duplicate;IGN_GAZEBO_RESOURCE_PATH;share;@CMAKE_INSTALL_PREFIX@/share \ No newline at end of file diff --git a/leo_description/hooks/leo_description.sh.in b/leo_description/hooks/leo_description.sh.in deleted file mode 100644 index 33fa6b2..0000000 --- a/leo_description/hooks/leo_description.sh.in +++ /dev/null @@ -1 +0,0 @@ -ament_prepend_unique_value IGN_GAZEBO_RESOURCE_PATH "$AMENT_CURRENT_PREFIX/share/@PROJECT_NAME@/models" \ No newline at end of file From fc4bde04925eb619675bfd030a500398787f53d7 Mon Sep 17 00:00:00 2001 From: Jan Hernas Date: Tue, 17 Oct 2023 12:23:40 +0200 Subject: [PATCH 10/14] Remove joint prefix --- leo_description/urdf/macros.xacro | 39 ++++++++++++++----------------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/leo_description/urdf/macros.xacro b/leo_description/urdf/macros.xacro index d7e8638..f8cc509 100644 --- a/leo_description/urdf/macros.xacro +++ b/leo_description/urdf/macros.xacro @@ -5,8 +5,7 @@ params="default_antenna:=true rockers_fixed:=true footprint_link:=true - link_prefix:='' - joint_prefix:='' + link_prefix:='' imu_translation:='0.0628 -0.0314 -0.0393'"> @@ -131,7 +130,7 @@ - + @@ -145,7 +144,7 @@ - + @@ -154,7 +153,7 @@ - + @@ -164,7 +163,7 @@ - + @@ -173,7 +172,7 @@ - + @@ -182,7 +181,7 @@ - + @@ -191,7 +190,7 @@ - + @@ -201,26 +200,26 @@ - + - + - + - + @@ -456,10 +455,10 @@ - ${joint_prefix}wheel_FL_joint - ${joint_prefix}wheel_FR_joint - ${joint_prefix}wheel_RL_joint - ${joint_prefix}wheel_RR_joint + wheel_FL_joint + wheel_FR_joint + wheel_RL_joint + wheel_RR_joint 0.358 0.0625 odom @@ -490,11 +489,9 @@ + link_prefix="${link_prefix}"/> - + From b6efd5050cb4920106495a7f1d7148f6a867866e Mon Sep 17 00:00:00 2001 From: Jan Hernas Date: Tue, 17 Oct 2023 12:52:29 +0200 Subject: [PATCH 11/14] Add imu system plugin --- leo_description/urdf/macros.xacro | 3 +++ 1 file changed, 3 insertions(+) diff --git a/leo_description/urdf/macros.xacro b/leo_description/urdf/macros.xacro index f8cc509..c2c7dd2 100644 --- a/leo_description/urdf/macros.xacro +++ b/leo_description/urdf/macros.xacro @@ -439,6 +439,9 @@ name="ignition::gazebo::systems::JointStatePublisher"> ${link_prefix}joint_states + + From 45b1dd585745c39976bf4bb7a2105b9a62ca3006 Mon Sep 17 00:00:00 2001 From: Jan Hernas Date: Tue, 17 Oct 2023 15:48:43 +0200 Subject: [PATCH 12/14] Bring back joint_prefix param --- leo_description/urdf/macros.xacro | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/leo_description/urdf/macros.xacro b/leo_description/urdf/macros.xacro index c2c7dd2..c9583d9 100644 --- a/leo_description/urdf/macros.xacro +++ b/leo_description/urdf/macros.xacro @@ -5,7 +5,8 @@ params="default_antenna:=true rockers_fixed:=true footprint_link:=true - link_prefix:='' + link_prefix:='' + joint_prefix:='' imu_translation:='0.0628 -0.0314 -0.0393'"> From 58cf2c57c0c435dd31be4a084896b5d1d4d0714c Mon Sep 17 00:00:00 2001 From: Jan Hernas Date: Wed, 18 Oct 2023 12:29:44 +0200 Subject: [PATCH 13/14] Add joints prefix param to all joints --- leo_description/urdf/macros.xacro | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/leo_description/urdf/macros.xacro b/leo_description/urdf/macros.xacro index c9583d9..2b44294 100644 --- a/leo_description/urdf/macros.xacro +++ b/leo_description/urdf/macros.xacro @@ -6,7 +6,7 @@ rockers_fixed:=true footprint_link:=true link_prefix:='' - joint_prefix:='' + joint_prefix:='' imu_translation:='0.0628 -0.0314 -0.0393'"> @@ -131,7 +131,7 @@ - + @@ -145,7 +145,7 @@ - + @@ -154,7 +154,7 @@ - + @@ -164,7 +164,7 @@ - + @@ -173,7 +173,7 @@ - + @@ -182,7 +182,7 @@ - + @@ -191,7 +191,7 @@ - + @@ -201,26 +201,26 @@ - + - + - + - + @@ -231,8 +231,7 @@ + params="robot_ns:='''"> @@ -485,10 +484,8 @@ robot_ns:=''"> - - Date: Wed, 18 Oct 2023 13:02:56 +0200 Subject: [PATCH 14/14] Remove unnecessary link prefixes --- leo_description/urdf/macros.xacro | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/leo_description/urdf/macros.xacro b/leo_description/urdf/macros.xacro index 2b44294..9ac093e 100644 --- a/leo_description/urdf/macros.xacro +++ b/leo_description/urdf/macros.xacro @@ -390,8 +390,8 @@ - - + + 1.9 640 @@ -445,7 +445,7 @@ - + 100 true ${link_prefix}imu/data_raw