forked from gazebosim/gz-launch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Launch file with mecanum_drive joy configuration
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
- Loading branch information
Showing
1 changed file
with
142 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,142 @@ | ||
<?xml version='1.0'?> | ||
<!-- Usage: ign launch gazebo_plugins.ign [worldName:=<worldName>] | ||
The [worldName] command line argument is optional. If left blank, or not | ||
specified, then "diff_drive" is used for the world name. | ||
Example that loads the shapes.sdf world instead of diff_drive: | ||
ign launch gazebo_plugins.ign worldName:=shapes | ||
--> | ||
<% | ||
# Check if worldName is not defined or is empty/nil | ||
if !defined?(worldName) || worldName == nil || worldName.empty? | ||
worldName = "mecanum_drive" | ||
end | ||
%> | ||
|
||
<!-- Requires ign-gazebo branch support_loading_plugins_programmatically --> | ||
<ignition version='1.0'> | ||
<!-- Load a joystick plugin that will read from a device and output to a | ||
topic --> | ||
<plugin name="ignition::launch::Joystick" | ||
filename="ignition-launch-joystick"> | ||
<device>/dev/input/js0</device> | ||
<sticky_buttons>false</sticky_buttons> | ||
<dead_zone>0.05</dead_zone> | ||
<rate>60</rate> | ||
<accumulation_rate>1000</accumulation_rate> | ||
</plugin> | ||
|
||
<!-- Load a plugin that transforms a joystick message to a | ||
twist message --> | ||
<plugin name="ignition::launch::JoyToTwist" | ||
filename="ignition-launch-joytotwist"> | ||
<input_topic>/joy</input_topic> | ||
<output_topic>/model/vehicle_blue/cmd_vel</output_topic> | ||
<enable_button>4</enable_button> | ||
<enable_turbo_button>5</enable_turbo_button> | ||
<!-- axis 0 for lateral translation --> | ||
<!-- axis 1 for longitudinal translation --> | ||
<axis_linear>1 0 0</axis_linear> | ||
<scale_linear>2 2 0</scale_linear> | ||
<scale_linear_turbo>5 5 0</scale_linear_turbo> | ||
<!-- axis 2 for yaw rotation --> | ||
<axis_angular>0 0 2</axis_angular> | ||
<scale_angular>0 0 2</scale_angular> | ||
<scale_angular_turbo>0 0 5</scale_angular_turbo> | ||
</plugin> | ||
|
||
<!-- Run the gazebo server with a set of plugins --> | ||
<plugin name="ignition::launch::GazeboServer" | ||
filename="ignition-launch-gazebo"> | ||
<world_file><%= worldName %>.sdf</world_file> | ||
<run>true</run> | ||
<update_rate>1000</update_rate> | ||
</plugin> | ||
|
||
<executable_wrapper> | ||
<plugin name="ignition::launch::GazeboGui" | ||
filename="ignition-launch-gazebogui"> | ||
|
||
<!-- Override default window title (Gazebo) --> | ||
<window_title>Ignition Launch</window_title> | ||
|
||
<!-- Override default icon. | ||
In this example, setting to a resource file shipped with Ignition GUI --> | ||
<window_icon>:/qml/images/drawer.png</window_icon> | ||
<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> | ||
<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> | ||
<service>/world/<%= worldName %>/control</service> | ||
<stats_topic>/world/<%= worldName %>/stats</stats_topic> | ||
|
||
</plugin> | ||
|
||
<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> | ||
<topic>/world/<%= worldName %>/stats</topic> | ||
</plugin> | ||
|
||
<!-- Entity tree --> | ||
<plugin filename="EntityTree" name="Entity tree"> | ||
<ignition-gui> | ||
<title>Entity tree</title> | ||
</ignition-gui> | ||
</plugin> | ||
|
||
<!-- Transform Control --> | ||
<plugin filename="TransformControl" name="Transform Control"> | ||
<service>/world/<%= worldName %>/gui/transform_mode</service> | ||
</plugin> | ||
</plugin> | ||
</executable_wrapper> | ||
|
||
</ignition> |