Skip to content

Commit b8d43cb

Browse files
nkoenigmdm3dacschangNate Koenig
authored
Submitted models/robotika kloubak sensor config 1 (#381)
* Model submission for Kloubak sensor configuration 1 from Robotika * Kloubak URDF ver0 * Robotika Kloubak URDF ver1 * Robotika Kloubak - scale material parameters to 0..1 * Kloubak specification.md ver0 * Robotika Kloubak - update specification.md * Robotika Kloubak - fix also urdf/model.xacro (range 0..1) * Branch for pull request #431 * Robotika Kloubak K2 - fixes (lidar, odometry, battery power_load, ...) * Adjustment to route front and rear DiffDrive odometry to the appropriate topics. * Robotika Kloubak K2 - update specification * Robotika Kloubak K2 - update specification2 * Robotika Kloubak K2 - update specification3 * Update specifications.md with magnetometer and added optical frame publishers Signed-off-by: Nate Koenig <[email protected]> * Updating tf Signed-off-by: Nate Koenig <[email protected]> * Fix spawning Signed-off-by: Nate Koenig <[email protected]> * Updated to use photogrammetry meshes Signed-off-by: Nate Koenig <[email protected]> * Download model Signed-off-by: Nate Koenig <[email protected]> * 60 minutes of charge Signed-off-by: Nate Koenig <[email protected]> Co-authored-by: md <devnull@localhost> Co-authored-by: Martin Dlouhy <[email protected]> Co-authored-by: acschang <[email protected]> Co-authored-by: Arthur Schang <[email protected]> Co-authored-by: Nate Koenig <[email protected]>
1 parent 802628d commit b8d43cb

32 files changed

+121204
-0
lines changed

docker/download_models.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ ign fuel download --url "https://fuel.ignitionrobotics.org/OpenRobotics/models/C
5555
ign fuel download --url "https://fuel.ignitionrobotics.org/OpenRobotics/models/SOPHISTICATED_ENGINEERING_X2_SENSOR_CONFIG_1" -v 4
5656
ign fuel download --url "https://fuel.ignitionrobotics.org/OpenRobotics/models/SOPHISTICATED_ENGINEERING_X4_SENSOR_CONFIG_1" -v 4
5757
ign fuel download --url "https://fuel.ignitionrobotics.org/OpenRobotics/models/DronePlatformX1" -v 4
58+
ign fuel download --url "https://fuel.ignitionrobotics.org/OpenRobotics/models/ROBOTIKA_KLOUBAK_SENSOR_CONFIG_1" -v 4
5859

5960
# Download the tunnel circuit models
6061
ign fuel download --url "https://fuel.ignitionrobotics.org/OpenRobotics/models/subt_tunnel_staging_area" -v 4
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
cmake_minimum_required(VERSION 2.8.3)
2+
project(robotika_kloubak_sensor_config_1)
3+
4+
find_package(catkin REQUIRED)
5+
6+
catkin_package()
7+
8+
install(DIRECTORY launch materials meshes urdf
9+
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
10+
11+
install(FILES model.sdf model.config
12+
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
13+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0"?>
2+
<launch>
3+
<arg name="name" doc="Name of Vehicle"/>
4+
<param name="$(arg name)/robot_description" command="$(find xacro)/xacro '$(find robotika_kloubak_sensor_config_1)/urdf/model.xacro' name:=$(arg name)"/>
5+
</launch>
6+
Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
<?xml version="1.0"?>
2+
<!-- Usage: ign launch path/to/example.ign robotName:=<X1>
3+
4+
Parameters:
5+
robotName: Name to be assigned to model
6+
-->
7+
8+
<%
9+
require_relative 'spawner'
10+
11+
# Modify these as needed
12+
$enableGroundTruth = true
13+
$headless = local_variables.include?(:headless) ? :headless : false
14+
15+
%>
16+
17+
<%
18+
19+
unless local_variables.include?(:robotName)
20+
raise "missing parameters. robotName is a required parameter"
21+
end
22+
23+
# This assumes that this launch file is in a directory below the model
24+
modelURI = File.expand_path("../", File.dirname(__FILE__))
25+
$worldName = 'example'
26+
worldFile = File.join(File.expand_path("../worlds", File.dirname(__FILE__)), "#{$worldName}.sdf")
27+
28+
%>
29+
30+
<ignition version='1.0'>
31+
<env>
32+
<name>IGN_GAZEBO_SYSTEM_PLUGIN_PATH</name>
33+
<value>$LD_LIBRARY_PATH</value>
34+
</env>
35+
36+
<!-- Start ROS first. This is a bit hacky for now. -->
37+
<!-- Make sure to source /opt/ros/melodic/setup.bash -->
38+
<executable name='ros'>
39+
<command>roslaunch subt_ros competition_init.launch world_name:=<%=$worldName%> vehicle_topics:=0 enable_ground_truth:=<%=($enableGroundTruth)?"1":"0"%> robot_names:=<%=robotName%></command>
40+
</executable>
41+
42+
<plugin name="ignition::launch::GazeboServer"
43+
filename="libignition-launch-gazebo.so">
44+
<world_file><%= worldFile %></world_file>
45+
<run>true</run>
46+
<levels>false</levels>
47+
<record>
48+
<enabled>false</enabled>
49+
</record>
50+
51+
<plugin entity_name="<%= $worldName %>"
52+
entity_type="world"
53+
filename="libignition-gazebo-physics-system.so"
54+
name="ignition::gazebo::systems::Physics">
55+
</plugin>
56+
57+
<plugin entity_name="<%= $worldName %>"
58+
entity_type="world"
59+
filename="libignition-gazebo-sensors-system.so"
60+
name="ignition::gazebo::systems::Sensors">
61+
<render_engine>ogre2</render_engine>
62+
</plugin>
63+
<plugin entity_name="<%= $worldName %>"
64+
entity_type="world"
65+
filename="libignition-gazebo-user-commands-system.so"
66+
name="ignition::gazebo::systems::UserCommands">
67+
</plugin>
68+
<plugin entity_name="<%= $worldName %>"
69+
entity_type="world"
70+
filename="libignition-gazebo-scene-broadcaster-system.so"
71+
name="ignition::gazebo::systems::SceneBroadcaster">
72+
</plugin>
73+
<plugin entity_name="<%= $worldName %>"
74+
entity_type="world"
75+
filename="libignition-gazebo-imu-system.so"
76+
name="ignition::gazebo::systems::Imu">
77+
</plugin>
78+
79+
<plugin entity_name="<%= $worldName %>"
80+
entity_type="world"
81+
filename="libignition-gazebo-magnetometer-system.so"
82+
name="ignition::gazebo::systems::Magnetometer">
83+
</plugin>
84+
85+
<plugin entity_name="<%= $worldName %>"
86+
entity_type="world"
87+
filename="libignition-gazebo-air-pressure-system.so"
88+
name="ignition::gazebo::systems::AirPressure">
89+
</plugin>
90+
</plugin>
91+
92+
<%if !$headless %>
93+
<executable_wrapper>
94+
<plugin name="ignition::launch::GazeboGui"
95+
filename="libignition-launch-gazebogui.so">
96+
<world_name><%= $worldName %></world_name>
97+
<window_title>SubT Simulator</window_title>
98+
<window_icon><%= ENV['SUBT_IMAGES_PATH'] %>/SubT_logo.svg</window_icon>
99+
<plugin filename="GzScene3D" name="3D View">
100+
<ignition-gui>
101+
<title>3D View</title>
102+
<property type="bool" key="showTitleBar">false</property>
103+
<property type="string" key="state">docked</property>
104+
</ignition-gui>
105+
106+
<engine>ogre2</engine>
107+
<scene>scene</scene>
108+
<ambient_light>0.2 0.2 0.1</ambient_light>
109+
<background_color>0.8 0.8 0.8</background_color>
110+
<camera_pose>-6.3 -4.2 3.6 0 0.268 0.304</camera_pose>
111+
<service>/world/<%= $worldName %>/scene/info</service>
112+
<pose_topic>/world/<%= $worldName %>/pose/info</pose_topic>
113+
<scene_topic>/world/<%= $worldName %>/scene/info</scene_topic>
114+
<deletion_topic>/world/<%= $worldName %>/scene/deletion</deletion_topic>
115+
</plugin>
116+
<plugin filename="WorldControl" name="World control">
117+
<ignition-gui>
118+
<title>World control</title>
119+
<property type="bool" key="showTitleBar">false</property>
120+
<property type="bool" key="resizable">false</property>
121+
<property type="double" key="height">72</property>
122+
<property type="double" key="width">121</property>
123+
<property type="double" key="z">1</property>
124+
125+
<property type="string" key="state">floating</property>
126+
<anchors target="3D View">
127+
<line own="left" target="left"/>
128+
<line own="bottom" target="bottom"/>
129+
</anchors>
130+
</ignition-gui>
131+
132+
<play_pause>true</play_pause>
133+
<step>true</step>
134+
<start_paused>true</start_paused>
135+
<service>/world/<%= $worldName %>/control</service>
136+
<stats_topic>/world/<%= $worldName %>/stats</stats_topic>
137+
138+
</plugin>
139+
140+
<plugin filename="WorldStats" name="World stats">
141+
<ignition-gui>
142+
<title>World stats</title>
143+
<property type="bool" key="showTitleBar">false</property>
144+
<property type="bool" key="resizable">false</property>
145+
<property type="double" key="height">110</property>
146+
<property type="double" key="width">290</property>
147+
<property type="double" key="z">1</property>
148+
149+
<property type="string" key="state">floating</property>
150+
<anchors target="3D View">
151+
<line own="right" target="right"/>
152+
<line own="bottom" target="bottom"/>
153+
</anchors>
154+
</ignition-gui>
155+
156+
<sim_time>true</sim_time>
157+
<real_time>true</real_time>
158+
<real_time_factor>true</real_time_factor>
159+
<iterations>true</iterations>
160+
<topic>/world/<%= $worldName %>/stats</topic>
161+
</plugin>
162+
</plugin>
163+
</executable_wrapper>
164+
<%end%>
165+
166+
<%= spawner(robotName, modelURI, $worldName, 0, 0, 0, 0, 0, 0) %>
167+
<%= rosExecutables(robotName, $worldName) %>
168+
169+
</ignition>
170+
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
def spawner(_name, _modelURI, _worldName, _x, _y, _z, _roll, _pitch, _yaw)
2+
<<-HEREDOC
3+
<spawn name='#{_name}'>
4+
<name>#{_name}</name>
5+
<allow_renaming>false</allow_renaming>
6+
<pose>#{_x} #{_y} #{_z + 0.25} #{_roll} #{_pitch} #{_yaw}</pose>
7+
<world>#{_worldName}</world>
8+
<is_performer>true</is_performer>
9+
<sdf version='1.6'>
10+
<include>
11+
<name>#{_name}</name>
12+
<uri>#{_modelURI}</uri>
13+
<!-- Diff drive front -->
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+
<right_joint>front_right_wheel_joint</right_joint>
18+
<wheel_separation>0.50</wheel_separation>
19+
<wheel_radius>0.15</wheel_radius>
20+
<topic>/model/#{_name}/cmd_vel_relay/front</topic>
21+
<odom_topic>/model/#{_name}/odometry/front</odom_topic>
22+
<min_velocity>-2.5</min_velocity>
23+
<max_velocity>2.5</max_velocity>
24+
<min_acceleration>-8.8</min_acceleration>
25+
<max_acceleration>8.8</max_acceleration>
26+
</plugin>
27+
<!-- Diff drive rear -->
28+
<plugin filename=\"libignition-gazebo-diff-drive-system.so\"
29+
name=\"ignition::gazebo::systems::DiffDrive\">
30+
<left_joint>rear_left_wheel_joint</left_joint>
31+
<right_joint>rear_right_wheel_joint</right_joint>
32+
<wheel_separation>0.50</wheel_separation>
33+
<wheel_radius>0.15</wheel_radius>
34+
<topic>/model/#{_name}/cmd_vel_relay/rear</topic>
35+
<odom_topic>/model/#{_name}/odometry/rear</odom_topic>
36+
<min_velocity>-2.5</min_velocity>
37+
<max_velocity>2.5</max_velocity>
38+
<min_acceleration>-8.8</min_acceleration>
39+
<max_acceleration>8.8</max_acceleration>
40+
</plugin>
41+
<!-- Publish robot state information -->
42+
<plugin filename=\"libignition-gazebo-pose-publisher-system.so\"
43+
name=\"ignition::gazebo::systems::PosePublisher\">
44+
<publish_link_pose>true</publish_link_pose>
45+
<publish_sensor_pose>true</publish_sensor_pose>
46+
<publish_collision_pose>false</publish_collision_pose>
47+
<publish_visual_pose>false</publish_visual_pose>
48+
<publish_nested_model_pose>#{$enableGroundTruth}</publish_nested_model_pose>
49+
<use_pose_vector_msg>true</use_pose_vector_msg>
50+
<static_publisher>true</static_publisher>
51+
<static_update_frequency>1</static_update_frequency>
52+
</plugin>
53+
<!-- Battery plugin -->
54+
<plugin filename=\"libignition-gazebo-linearbatteryplugin-system.so\"
55+
name=\"ignition::gazebo::systems::LinearBatteryPlugin\">
56+
<battery_name>linear_battery</battery_name>
57+
<voltage>25.2</voltage>
58+
<open_circuit_voltage_constant_coef>25.2</open_circuit_voltage_constant_coef>
59+
<open_circuit_voltage_linear_coef>-7.2</open_circuit_voltage_linear_coef>
60+
<initial_charge>13.214</initial_charge>
61+
<capacity>13.214</capacity>
62+
<resistance>0.052</resistance>
63+
<smooth_current_tau>5.0</smooth_current_tau>
64+
<power_load>3.33</power_load>
65+
<start_on_motion>true</start_on_motion>
66+
</plugin>
67+
<!-- Gas Sensor plugin -->"
68+
<plugin filename="libGasEmitterDetectorPlugin.so"
69+
name="subt::GasDetector">
70+
<topic>/model/#{_name}/gas_detected</topic>
71+
<update_rate>10</update_rate>
72+
<type>gas</type>
73+
</plugin>
74+
</include>
75+
</sdf>
76+
</spawn>
77+
HEREDOC
78+
end
79+
80+
def rosExecutables(_name, _worldName)
81+
<<-HEREDOC
82+
<executable name='robot_description'>
83+
<command>roslaunch --wait robotika_kloubak_sensor_config_1 description.launch world_name:=#{_worldName} name:=#{_name}</command>
84+
</executable>
85+
<executable name='kloubak_ros_ign_bridge'>
86+
<command>roslaunch --wait robotika_kloubak_sensor_config_1 vehicle_topics.launch world_name:=#{_worldName} name:=#{_name}</command>
87+
</executable>
88+
HEREDOC
89+
end

0 commit comments

Comments
 (0)