Skip to content

Commit 083c6a8

Browse files
authored
Proper tracks model: more robots (#1048)
Adds proper tracks also to the following robots: CCN_MARMOTTE MARBLE_HD2 CSIRO_DATA61_DTR CSIRO_DATA61_OZBOT_ATR CORO_HD2 The battery draining is done via power_draining_topic battery plugin parameters. Also fixes the Marble HD2 model textures.
1 parent fc87241 commit 083c6a8

File tree

62 files changed

+1190
-6208
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+1190
-6208
lines changed

submitted_models/coro_hd2_sensor_config_1/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ find_package(catkin REQUIRED)
55

66
catkin_package()
77

8-
install(DIRECTORY launch meshes materials urdf
8+
install(DIRECTORY launch meshes materials urdf worlds
99
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
1010

1111
install(FILES model.sdf model.config

submitted_models/coro_hd2_sensor_config_1/launch/example.ign

+13-6
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,17 @@
66
-->
77

88
<%
9-
require_relative 'spawner'
9+
#require_relative 'spawner'
10+
_base_dir = defined?(base_dir) ? base_dir.tr('"', '') : File.realpath(File.join(File.dirname(__FILE__), ".."))
11+
load File.join(_base_dir, "launch", "spawner.rb")
1012
1113
# Modify these as needed
1214
$enableGroundTruth = true
13-
$headless = false
15+
$headless = local_variables.include?(:headless) ? :headless : false
1416
1517
%>
1618

1719
<%
18-
1920
unless local_variables.include?(:robotName)
2021
raise "missing parameters. robotName is a required parameter"
2122
end
@@ -35,9 +36,11 @@
3536

3637
<!-- Start ROS first. This is a bit hacky for now. -->
3738
<!-- Make sure to source /opt/ros/melodic/setup.bash -->
39+
<% if local_variables.include?(:ros) and ros %>
3840
<executable name='ros'>
3941
<command>roslaunch subt_ros competition_init.launch world_name:=<%=$worldName%> vehicle_topics:=0 enable_ground_truth:=<%=($enableGroundTruth)?"1":"0"%> robot_names:=<%=robotName%></command>
4042
</executable>
43+
<% end %>
4144

4245
<plugin name="ignition::launch::GazeboServer"
4346
filename="libignition-launch-gazebo.so">
@@ -163,9 +166,13 @@
163166
</executable_wrapper>
164167
<%end%>
165168

166-
<plugin name="ignition::launch::GazeboFactory" filename="libignition-launch-gazebo-factory.so">
167-
<%= spawner(robotName, modelURI, $worldName, 0, 0, 0, 0, 0, 0) %>
169+
<plugin name="ignition::launch::GazeboFactory"
170+
filename="ignition-launch-gazebo-factory">
171+
<%= spawner(robotName, modelURI, $worldName, 0, 0, 0, 0, 0, 0) %>
168172
</plugin>
169-
<%= rosExecutables(robotName, $worldName) %>
173+
<% if local_variables.include?(:ros) and ros %>
174+
<%= rosExecutables(robotName, $worldName) %>
175+
<% end %>
170176

171177
</ignition>
178+

submitted_models/coro_hd2_sensor_config_1/launch/spawner.rb

+15-69
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,20 @@ def spawner(_name, _modelURI, _worldName, _x, _y, _z, _roll, _pitch, _yaw)
1010
<include>
1111
<name>#{_name}</name>
1212
<uri>#{_modelURI}</uri>
13-
<!-- Diff drive -->
14-
<plugin filename="libignition-gazebo-diff-drive-system.so"
15-
name="ignition::gazebo::systems::DiffDrive">
16-
<left_joint>front_left_wheel_joint</left_joint>
17-
<left_joint>front_middle_left_wheel_joint</left_joint>
18-
<left_joint>rear_middle_left_wheel_joint</left_joint>
19-
<left_joint>rear_left_wheel_joint</left_joint>
20-
<right_joint>front_right_wheel_joint</right_joint>
21-
<right_joint>front_middle_right_wheel_joint</right_joint>
22-
<right_joint>rear_middle_right_wheel_joint</right_joint>
23-
<right_joint>rear_right_wheel_joint</right_joint>
24-
<wheel_separation>#{0.525}</wheel_separation>
25-
<wheel_radius>0.129</wheel_radius>
13+
<!-- Tracked vehicle controller -->
14+
<plugin name="ignition::gazebo::systems::TrackedVehicle" filename="ignition-gazebo-tracked-vehicle-system">
15+
<left_track><link>left_track</link></left_track>
16+
<right_track><link>right_track</link></right_track>
17+
<tracks_separation>#{0.525}</tracks_separation>
18+
<tracks_height>0.258</tracks_height>
19+
<steering_efficiency>0.5</steering_efficiency>
2620
<topic>/model/#{_name}/cmd_vel_relay</topic>
27-
<min_velocity>-1</min_velocity>
28-
<max_velocity>1</max_velocity>
29-
<min_acceleration>-3</min_acceleration>
30-
<max_acceleration>3</max_acceleration>
21+
<linear_velocity>
22+
<min_velocity>-1</min_velocity>
23+
<max_velocity>1</max_velocity>
24+
<min_acceleration>-3</min_acceleration>
25+
<max_acceleration>3</max_acceleration>
26+
</linear_velocity>
3127
</plugin>
3228
<!-- Publish robot state information -->
3329
<plugin filename="libignition-gazebo-pose-publisher-system.so"
@@ -54,6 +50,8 @@ def spawner(_name, _modelURI, _worldName, _x, _y, _z, _roll, _pitch, _yaw)
5450
<smooth_current_tau>1.9499</smooth_current_tau>
5551
<power_load>9.9</power_load>
5652
<start_on_motion>true</start_on_motion>
53+
<power_draining_topic>/model/#{_name}/link/left_track/track_cmd_vel</power_draining_topic>
54+
<power_draining_topic>/model/#{_name}/link/right_track/track_cmd_vel</power_draining_topic>
5755
</plugin>
5856
<!-- Gas Sensor plugin -->
5957
<plugin filename="libGasEmitterDetectorPlugin.so"
@@ -62,58 +60,6 @@ def spawner(_name, _modelURI, _worldName, _x, _y, _z, _roll, _pitch, _yaw)
6260
<update_rate>10</update_rate>
6361
<type>gas</type>
6462
</plugin>
65-
<!-- Wheel slip -->
66-
<plugin filename="libignition-gazebo-wheel-slip-system.so"
67-
name="ignition::gazebo::systems::WheelSlip">
68-
<wheel link_name="front_left_wheel_link">
69-
<slip_compliance_lateral>0.086</slip_compliance_lateral>
70-
<slip_compliance_longitudinal>0</slip_compliance_longitudinal>
71-
<wheel_normal_force>41.47103925</wheel_normal_force>
72-
<wheel_radius>0.129</wheel_radius>
73-
</wheel>
74-
<wheel link_name="front_middle_left_wheel_link">
75-
<slip_compliance_lateral>0.086</slip_compliance_lateral>
76-
<slip_compliance_longitudinal>0</slip_compliance_longitudinal>
77-
<wheel_normal_force>41.47103925</wheel_normal_force>
78-
<wheel_radius>0.129</wheel_radius>
79-
</wheel>
80-
<wheel link_name="rear_middle_left_wheel_link">
81-
<slip_compliance_lateral>0.086</slip_compliance_lateral>
82-
<slip_compliance_longitudinal>0</slip_compliance_longitudinal>
83-
<wheel_normal_force>41.47103925</wheel_normal_force>
84-
<wheel_radius>0.129</wheel_radius>
85-
</wheel>
86-
<wheel link_name="rear_left_wheel_link">
87-
<slip_compliance_lateral>0.086</slip_compliance_lateral>
88-
<slip_compliance_longitudinal>0.25</slip_compliance_longitudinal>
89-
<wheel_normal_force>41.47103925</wheel_normal_force>
90-
<wheel_radius>0.129</wheel_radius>
91-
</wheel>
92-
<wheel link_name="front_right_wheel_link">
93-
<slip_compliance_lateral>0.086</slip_compliance_lateral>
94-
<slip_compliance_longitudinal>0</slip_compliance_longitudinal>
95-
<wheel_normal_force>41.47103925</wheel_normal_force>
96-
<wheel_radius>0.129</wheel_radius>
97-
</wheel>
98-
<wheel link_name="front_middle_right_wheel_link">
99-
<slip_compliance_lateral>0.086</slip_compliance_lateral>
100-
<slip_compliance_longitudinal>0</slip_compliance_longitudinal>
101-
<wheel_normal_force>41.47103925</wheel_normal_force>
102-
<wheel_radius>0.129</wheel_radius>
103-
</wheel>
104-
<wheel link_name="rear_middle_right_wheel_link">
105-
<slip_compliance_lateral>0.086</slip_compliance_lateral>
106-
<slip_compliance_longitudinal>0</slip_compliance_longitudinal>
107-
<wheel_normal_force>41.47103925</wheel_normal_force>
108-
<wheel_radius>0.129</wheel_radius>
109-
</wheel>
110-
<wheel link_name="rear_right_wheel_link">
111-
<slip_compliance_lateral>0.086</slip_compliance_lateral>
112-
<slip_compliance_longitudinal>0</slip_compliance_longitudinal>
113-
<wheel_normal_force>41.47103925</wheel_normal_force>
114-
<wheel_radius>0.129</wheel_radius>
115-
</wheel>
116-
</plugin>
11763
</include>
11864
</sdf>
11965
</spawn>

0 commit comments

Comments
 (0)