Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for tracked vehicles #869

Merged
merged 23 commits into from
Nov 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
6be22a4
Added support for tracked vehicles.
peci1 Jun 20, 2021
506292c
Fixed codecheck issues
peci1 Jun 21, 2021
dc17b53
Fixed issues from review.
peci1 Jul 3, 2021
2107023
Improved docs.
peci1 Jul 3, 2021
28aebe1
Fixed issues from review and synchronized with latest ign-physics cha…
peci1 Jul 14, 2021
c39fde2
Update with latest changes in ign-physics.
peci1 Nov 1, 2021
b90247f
Temporary backport of transport::validTopic() from ign-gazebo4.
peci1 Nov 1, 2021
9f73f9b
Removed unneeded NOLINT.
peci1 Nov 1, 2021
42d9de7
Fix the way world entity is determined.
peci1 Nov 1, 2021
aee622d
Limit lambda scope.
peci1 Nov 1, 2021
616172b
Merge remote-tracking branch 'upstream/ign-gazebo3' into tracked-vehi…
azeey Nov 1, 2021
ea4d567
Skip tracked vehicle test if not supported by physics
azeey Nov 1, 2021
f259402
Revert "Temporary backport of transport::validTopic() from ign-gazebo4."
peci1 Nov 2, 2021
34d96ac
Moved PhysicsEvents.hh to physics/Events.hh.
peci1 Nov 2, 2021
64e7171
Removed pallet from test world.
peci1 Nov 2, 2021
2899d89
Converted INTEGRATION_tracked_vehicle_system test to a non-repeating …
peci1 Nov 2, 2021
4e30983
Disable tracked vehicles test on MacOS until #806 is resolved.
peci1 Nov 3, 2021
33ed2fd
Merge remote-tracking branch 'origin/ign-gazebo3' into tracked-vehicles
peci1 Nov 3, 2021
2f30d68
Addressed suggestions from review.
peci1 Nov 4, 2021
d60e1dc
Allow tracks controlled by TrackedVehicle plugin to be also controlle…
peci1 Nov 9, 2021
d0bcd4c
Added integration test with a conveyor to test track controller speed…
peci1 Nov 9, 2021
5fc3971
Fixed caching of collision poses in track controller during first col…
peci1 Nov 10, 2021
8086d1a
Merge remote-tracking branch 'upstream/ign-gazebo3' into tracked-vehi…
azeey Nov 10, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
350 changes: 350 additions & 0 deletions examples/worlds/conveyor.sdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,350 @@
<?xml version="1.0" ?>
<sdf version="1.7">
<world name="default">
<!--
A demo world for conveyor belt using the TrackController system.

Drive the belt by keyboard using W/S/X or by publishing Double message to
/model/conveyor/link/base_link/track_cmd_vel .

The interesting part with plugin definition starts around line 146.
-->
<physics name="4ms" type="ignored">
<max_step_size>0.004</max_step_size>
<real_time_factor>1.0</real_time_factor>
</physics>
<plugin
filename="ignition-gazebo-physics-system"
name="ignition::gazebo::systems::Physics">
</plugin>
<plugin
filename="ignition-gazebo-user-commands-system"
name="ignition::gazebo::systems::UserCommands">
</plugin>
<plugin
filename="ignition-gazebo-scene-broadcaster-system"
name="ignition::gazebo::systems::SceneBroadcaster">
</plugin>

<scene>
<ambient>1.0 1.0 1.0</ambient>
<background>0.8 0.8 0.8</background>
</scene>

<light type="directional" name="sun">
<cast_shadows>true</cast_shadows>
<pose>0 0 10 0 0 0</pose>
<diffuse>0.8 0.8 0.8 1</diffuse>
<specular>0.8 0.8 0.8 1</specular>
<attenuation>
<range>1000</range>
<constant>0.9</constant>
<linear>0.01</linear>
<quadratic>0.001</quadratic>
</attenuation>
<direction>-0.5 0.1 -0.9</direction>
</light>

<model name="conveyor">
<!-- <pose>0 0 0 0 0 -1.0</pose>-->
<static>1</static>
<link name='base_link'>
<pose relative_to='__model__'>0 0 0 0 0 0</pose>
<inertial>
<mass>6.06</mass>
<inertia>
<ixx>0.002731</ixx>
<ixy>0</ixy>
<ixz>0</ixz>
<iyy>0.032554</iyy>
<iyz>1.5e-05</iyz>
<izz>0.031391</izz>
</inertia>
</inertial>
<collision name='main_collision'>
<pose relative_to='base_link'>0 0 0 0 0 0</pose>
<geometry>
<box>
<size>5 0.2 0.1</size>
</box>
</geometry>
<surface>
<friction>
<ode>
<mu>0.7</mu>
<mu2>150</mu2>
<fdir1>0 1 0</fdir1>
</ode>
</friction>
</surface>
</collision>
<collision name='collision_1'>
<pose relative_to='base_link'>2.5 0 0 -1.570796327 0 0</pose>
<geometry>
<cylinder>
<length>0.2</length>
<radius>0.05</radius>
</cylinder>
</geometry>
<surface>
<friction>
<ode>
<mu>0.7</mu>
<mu2>150</mu2>
<fdir1>0 1 0</fdir1>
</ode>
</friction>
</surface>
</collision>
<collision name='collision_2'>
<pose relative_to='base_link'>-2.5 0 0 -1.570796327 0 0</pose>
<geometry>
<cylinder>
<length>0.2</length>
<radius>0.05</radius>
</cylinder>
</geometry>
<surface>
<friction>
<ode>
<mu>0.7</mu>
<mu2>150</mu2>
<fdir1>0 1 0</fdir1>
</ode>
</friction>
</surface>
</collision>
<visual name='main_visual'>
<pose relative_to='base_link'>0 0 0 0 0 0</pose>
<geometry>
<box>
<size>5 0.2 0.1</size>
</box>
</geometry>
</visual>
<visual name='visual_1'>
<pose relative_to='base_link'>2.5 0 0 -1.570796327 0 0</pose>
<geometry>
<cylinder>
<length>0.2</length>
<radius>0.05</radius>
</cylinder>
</geometry>
</visual>
<visual name='visual_2'>
<pose relative_to='base_link'>-2.5 0 0 -1.570796327 0 0</pose>
<geometry>
<cylinder>
<length>0.2</length>
<radius>0.05</radius>
</cylinder>
</geometry>
</visual>
<gravity>1</gravity>
<kinematic>0</kinematic>
</link>

<plugin filename="libignition-gazebo-track-controller-system.so"
name="ignition::gazebo::systems::TrackController">
<link>base_link</link>
<!--debug>true</debug-->
</plugin>

<!-- Moving Forward: W -->
<plugin filename="libignition-gazebo-triggered-publisher-system.so"
name="ignition::gazebo::systems::TriggeredPublisher">
<input type="ignition.msgs.Int32" topic="/keyboard/keypress">
<match field="data">87</match>
</input>
<output type="ignition.msgs.Double" topic="/model/conveyor/link/base_link/track_cmd_vel">
data: 10.0
</output>
</plugin>

<!-- Moving Backward: X -->
<plugin filename="libignition-gazebo-triggered-publisher-system.so"
name="ignition::gazebo::systems::TriggeredPublisher">
<input type="ignition.msgs.Int32" topic="/keyboard/keypress">
<match field="data">88</match>
</input>
<output type="ignition.msgs.Double" topic="/model/conveyor/link/base_link/track_cmd_vel">
data: -1.0
</output>
</plugin>

<!-- Stop: S -->
<plugin filename="libignition-gazebo-triggered-publisher-system.so"
name="ignition::gazebo::systems::TriggeredPublisher">
<input type="ignition.msgs.Int32" topic="/keyboard/keypress">
<match field="data">83</match>
</input>
<output type="ignition.msgs.Double" topic="/model/conveyor/link/base_link/track_cmd_vel">
data: 0.0
</output>
</plugin>
</model>

<model name='box'>
<pose frame=''>0 0 1 0 0 0</pose>
<link name='base_link'>
<inertial>
<mass>1.06</mass>
<inertia>
<ixx>0.01</ixx>
<ixy>0</ixy>
<ixz>0</ixz>
<iyy>0.01</iyy>
<iyz>0</iyz>
<izz>0.01</izz>
</inertia>
</inertial>
<visual name='main_visual'>
<pose relative_to='base_link'>0 0 0 0 0 0</pose>
<geometry>
<box>
<size>0.1 0.1 0.1</size>
</box>
</geometry>
<material>
<ambient>1 1 1 1</ambient>
</material>
</visual>
<collision name='main_collision'>
<geometry>
<box>
<size>0.1 0.1 0.1</size>
</box>
</geometry>
<pose relative_to='base_link'>0 0 0 0 0 0</pose>
</collision>
</link>
</model>

<gui fullscreen="0">
<!-- 3D scene -->
<plugin filename="GzScene3D" name="3D View">
<ignition-gui>
<title>3D View</title>
<property type="bool" key="showTitleBar">false</property>
<property type="string" key="state">docked</property>
</ignition-gui>

<engine>ogre2</engine>
<scene>scene</scene>
<ambient_light>0.4 0.4 0.4</ambient_light>
<background_color>0.8 0.8 0.8</background_color>
<camera_pose>-6 0 6 0 0.5 0</camera_pose>
</plugin>

<!-- World control -->
<plugin filename="WorldControl" name="World control">
<ignition-gui>
<title>World control</title>
<property type="bool" key="showTitleBar">false</property>
<property type="bool" key="resizable">false</property>
<property type="double" key="height">72</property>
<property type="double" key="width">121</property>
<property type="double" key="z">1</property>

<property type="string" key="state">floating</property>
<anchors target="3D View">
<line own="left" target="left"/>
<line own="bottom" target="bottom"/>
</anchors>
</ignition-gui>

<play_pause>true</play_pause>
<step>true</step>
<start_paused>true</start_paused>

</plugin>

<!-- World statistics -->
<plugin filename="WorldStats" name="World stats">
<ignition-gui>
<title>World stats</title>
<property type="bool" key="showTitleBar">false</property>
<property type="bool" key="resizable">false</property>
<property type="double" key="height">110</property>
<property type="double" key="width">290</property>
<property type="double" key="z">1</property>

<property type="string" key="state">floating</property>
<anchors target="3D View">
<line own="right" target="right"/>
<line own="bottom" target="bottom"/>
</anchors>
</ignition-gui>

<sim_time>true</sim_time>
<real_time>true</real_time>
<real_time_factor>true</real_time_factor>
<iterations>true</iterations>
</plugin>

<!-- Translate / rotate -->
<plugin filename="TransformControl" name="Transform control">
<ignition-gui>
<title>Transform control</title>
<anchors target="3D View">
<line own="left" target="left"/>
<line own="top" target="top"/>
</anchors>
<property key="resizable" type="bool">false</property>
<property key="width" type="double">230</property>
<property key="height" type="double">50</property>
<property key="state" type="string">floating</property>
<property key="showTitleBar" type="bool">false</property>
<property key="cardBackground" type="string">#666666</property>
</ignition-gui>
</plugin>

<!-- Insert simple shapes -->
<plugin filename="Shapes" name="Shapes">
<ignition-gui>
<anchors target="Transform control">
<line own="left" target="right"/>
<line own="top" target="top"/>
</anchors>
<property key="resizable" type="bool">false</property>
<property key="width" type="double">200</property>
<property key="height" type="double">50</property>
<property key="state" type="string">floating</property>
<property key="showTitleBar" type="bool">false</property>
<property key="cardBackground" type="string">#666666</property>
</ignition-gui>
</plugin>

<plugin filename="KeyPublisher" name="Key publisher">
<ignition-gui>
<anchors target="3D View">
<line own="right" target="right"/>
<line own="top" target="top"/>
</anchors>
<property key="resizable" type="bool">false</property>
<property key="width" type="double">5</property>
<property key="height" type="double">5</property>
<property key="state" type="string">floating</property>
<property key="showTitleBar" type="bool">false</property>
</ignition-gui>
</plugin>

<!-- Visualize Contacts TODO(peci1) uncomment in Dome -->
<!-- <plugin filename="VisualizeContacts" name="Visualize Contacts">-->
<!-- <ignition-gui>-->
<!-- <title>Visualize Contacts</title>-->
<!-- <anchors target="3D View">-->
<!-- <line own="right" target="right"/>-->
<!-- <line own="top" target="top"/>-->
<!-- </anchors>-->
<!-- <property key="resizable" type="bool">false</property>-->
<!-- <property key="width" type="double">230</property>-->
<!-- <property key="height" type="double">50</property>-->
<!-- <property key="state" type="string">floating</property>-->
<!-- <property key="showTitleBar" type="bool">false</property>-->
<!-- <property key="cardBackground" type="string">#ffffff</property>-->
<!-- </ignition-gui>-->
<!-- </plugin>-->
</gui>
</world>
</sdf>
Loading