Skip to content

Commit 21ab9b6

Browse files
nkoeniggitak2019knoedlerNate Koenigacschang
authored
Model submission for Karen ground robot sensor configuration 1 and 2… (#865)
* Add Coordinated Robotics Karen. Ackermann Steered Robot * Fix missing default and offset rgbd camera forward * Have description point to urdf * Adjust update rate and range * Adjust velocity limit to 1.0 until validation data available * Add compass/alt bridge, optical frame publishers * Adjust camera resolution per review comment * Wrong 100 was changed to 300, unique names * node fix * Disable description.launch / xacro / urdf * Fix incorrect battery life, fix incorrect velocity in config_2 * Model submission for Karen ground robot sensor configuration 1 and 2 from Coordinated Robotics (#815) * Add Coordinated Robotics Karen. Ackermann Steered Robot * Fix missing default and offset rgbd camera forward * Have description point to urdf * Adjust update rate and range * Adjust velocity limit to 1.0 until validation data available * Add compass/alt bridge, optical frame publishers * Adjust camera resolution per review comment * Wrong 100 was changed to 300, unique names * node fix * Disable description.launch / xacro / urdf * Fix incorrect battery life, fix incorrect velocity in config_2 Co-authored-by: Kevin <[email protected]> * Model updates * Added missing xacro * Aligned thermal camera range with the repository standard. * Thermal camera range of 100m Signed-off-by: Nate Koenig <[email protected]> * fix color and transparency Signed-off-by: Nate Koenig <[email protected]> * Removed wheel slip plugin Signed-off-by: Nate Koenig <[email protected]> Co-authored-by: Kevin <[email protected]> Co-authored-by: knoedler <[email protected]> Co-authored-by: Nate Koenig <[email protected]> Co-authored-by: Arthur Schang <[email protected]>
1 parent cabf598 commit 21ab9b6

30 files changed

+55216
-0
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
cmake_minimum_required(VERSION 2.8.3)
2+
project(coro_karen_sensor_config_1)
3+
4+
find_package(catkin REQUIRED COMPONENTS
5+
roscpp
6+
message_runtime
7+
std_msgs
8+
geometry_msgs
9+
)
10+
11+
12+
find_package(ignition-gazebo4 REQUIRED)
13+
find_package(ignition-transport9 REQUIRED)
14+
find_package(ignition-common3 REQUIRED)
15+
find_package(Eigen3 REQUIRED)
16+
17+
set(CMAKE_CXX_STANDARD 17)
18+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
19+
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
20+
21+
catkin_package(
22+
CATKIN_DEPENDS message_runtime roscpp std_msgs geometry_msgs
23+
)
24+
25+
26+
include_directories(
27+
include
28+
${catkin_INCLUDE_DIRS}
29+
)
30+
31+
add_library(ackermannlocal SHARED
32+
src/AckermannSteering.cc
33+
src/SpeedLimiter.cc
34+
)
35+
36+
target_link_libraries(ackermannlocal
37+
PUBLIC ${catkin_LIBRARIES}
38+
PRIVATE ignition-plugin1::ignition-plugin1
39+
PRIVATE ignition-gazebo4::ignition-gazebo4
40+
PRIVATE ignition-common3::ignition-common3
41+
PRIVATE ignition-transport9::ignition-transport9
42+
PRIVATE Eigen3::Eigen
43+
)
44+
45+
46+
install(TARGETS ackermannlocal
47+
ARCHIVE DESTINATION lib
48+
LIBRARY DESTINATION lib
49+
RUNTIME DESTINATION bin
50+
)
51+
52+
install(DIRECTORY launch meshes urdf worlds
53+
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
54+
55+
install(FILES model.sdf model.config
56+
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
57+
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 coro_karen_sensor_config_1)/urdf/karen.xacro' name:=$(arg name)"/>
5+
</launch>
6+
Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
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 = 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+
<plugin name="ignition::launch::GazeboFactory" filename="libignition-launch-gazebo-factory.so">
167+
<%= spawner(robotName, modelURI, $worldName, 0, 0, 0, 0, 0, 0) %>
168+
</plugin>
169+
<%= rosExecutables(robotName, $worldName) %>
170+
171+
</ignition>
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
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.2} #{_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+
<!-- Ackermann Steering -->
14+
<plugin filename="libackermannlocal.so"
15+
name="ignition::gazebo::systems::AckermannSteering">
16+
<left_joint>front_left_wheel_joint</left_joint>
17+
<left_joint>rear_left_wheel_joint</left_joint>
18+
<right_joint>front_right_wheel_joint</right_joint>
19+
<right_joint>rear_right_wheel_joint</right_joint>
20+
<left_steering_joint>front_left_wheel_steering_joint</left_steering_joint>
21+
<right_steering_joint>front_right_wheel_steering_joint</right_steering_joint>
22+
<wheel_separation>0.65</wheel_separation>
23+
<kingpin_width>0.44</kingpin_width>
24+
<steering_limit>0.187</steering_limit>
25+
<wheel_base>0.93</wheel_base>
26+
<wheel_radius>0.175</wheel_radius>
27+
<topic>/model/#{_name}/cmd_vel_relay</topic>
28+
<min_velocity>-1.0</min_velocity>
29+
<max_velocity>1.0</max_velocity>
30+
<min_acceleration>-3</min_acceleration>
31+
<max_acceleration>3</max_acceleration>
32+
</plugin>
33+
<!-- Publish robot state information -->
34+
<plugin filename="libignition-gazebo-pose-publisher-system.so"
35+
name="ignition::gazebo::systems::PosePublisher">
36+
<publish_link_pose>true</publish_link_pose>
37+
<publish_sensor_pose>true</publish_sensor_pose>
38+
<publish_collision_pose>false</publish_collision_pose>
39+
<publish_visual_pose>false</publish_visual_pose>
40+
<publish_nested_model_pose>#{$enableGroundTruth}</publish_nested_model_pose>
41+
<use_pose_vector_msg>true</use_pose_vector_msg>
42+
<static_publisher>true</static_publisher>
43+
<static_update_frequency>1</static_update_frequency>
44+
</plugin>
45+
<!-- Battery plugin -->
46+
<plugin filename="libignition-gazebo-linearbatteryplugin-system.so"
47+
name="ignition::gazebo::systems::LinearBatteryPlugin">
48+
<battery_name>linear_battery</battery_name>
49+
<voltage>12.694</voltage>
50+
<open_circuit_voltage_constant_coef>12.694</open_circuit_voltage_constant_coef>
51+
<open_circuit_voltage_linear_coef>-3.1424</open_circuit_voltage_linear_coef>
52+
<initial_charge>78.4</initial_charge>
53+
<capacity>78.4</capacity>
54+
<resistance>0.061523</resistance>
55+
<smooth_current_tau>1.9499</smooth_current_tau>
56+
<power_load>9.9</power_load>
57+
<start_on_motion>true</start_on_motion>
58+
</plugin>
59+
<!-- Gas Sensor plugin -->"
60+
<plugin filename="libGasEmitterDetectorPlugin.so"
61+
name="subt::GasDetector">
62+
<topic>/model/#{_name}/gas_detected</topic>
63+
<update_rate>10</update_rate>
64+
<type>gas</type>
65+
</plugin>
66+
</include>
67+
</sdf>
68+
</spawn>
69+
HEREDOC
70+
end
71+
72+
def rosExecutables(_name, _worldName)
73+
<<-HEREDOC
74+
<executable name='robot_description'>
75+
<command>roslaunch --wait coro_karen_sensor_config_1 description.launch world_name:=#{_worldName} name:=#{_name}</command>
76+
</executable>
77+
<executable name='topics'>
78+
<command>roslaunch --wait coro_karen_sensor_config_1 vehicle_topics.launch world_name:=#{_worldName} name:=#{_name}</command>
79+
</executable>
80+
HEREDOC
81+
end

0 commit comments

Comments
 (0)