Skip to content

Commit

Permalink
use keyboard twist to control scrimmage
Browse files Browse the repository at this point in the history
  • Loading branch information
SyllogismRXS committed Oct 20, 2017
1 parent 1a18210 commit ccebf8c
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 40 deletions.
12 changes: 10 additions & 2 deletions launch/user-control.launch
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
<launch>
<arg name="mission_file" default="user-control-jsbsim.xml"/>
<arg name="robot_id" default="1"/>
<arg name="robot_name" default="robot$(arg robot_id)"/>

<param name ="/use_sim_time" value="true"/>

<!-- All robots share scrimmage_ros -->
<node pkg="scrimmage_ros" type="scrimmage_ros.py" name="scrimmage_ros"
args="$(find scrimmage_ros)/missions/$(arg mission_file)"
output="screen"/>

output="screen"/>

<group ns="$(arg robot_name)">
<node pkg="teleop_twist_keyboard" type="teleop_twist_keyboard.py"
name="teleop_twist_keyboard"
output="screen"/>
</group>

</launch>
70 changes: 32 additions & 38 deletions missions/user-control-jsbsim.xml
Original file line number Diff line number Diff line change
@@ -1,78 +1,71 @@
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="http://gtri.gatech.edu"?>
<runscript xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<runscript xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
name="SASC Capture the Flag">
<run start="0.0" end="100" dt="0.0083333"
time_warp="1"

<run start="0.0" end="100" dt="0.0083333"
time_warp="1"
enable_gui="true"
network_gui="false"
start_paused="true"/>

<stream_port>50051</stream_port>
<stream_ip>localhost</stream_ip>
<end_condition>none</end_condition> <!-- time, one_team, none-->

<end_condition>none</end_condition> <!-- time, one_team, none-->

<grid_spacing>10</grid_spacing>
<grid_size>1000</grid_size>

<terrain>mcmillan</terrain>
<background_color>191 191 191</background_color> <!-- Red Green Blue -->
<gui_update_period>10</gui_update_period> <!-- milliseconds -->

<plot_tracks>false</plot_tracks>
<output_type>all</output_type>
<show_plugins>false</show_plugins>
<log_dir>~/.scrimmage/logs</log_dir>

<log_dir>~/.scrimmage/logs</log_dir>

<latitude_origin>35.721025</latitude_origin>
<longitude_origin>-120.767925</longitude_origin>
<longitude_origin>-120.767925</longitude_origin>
<altitude_origin>300</altitude_origin>
<show_origin>true</show_origin>
<origin_length>10</origin_length>

<entity_interaction order="0">SimpleCollision</entity_interaction>
<metrics order="0">SimpleCollisionMetrics</metrics>

<!-- uncomment "seed" and use integer for deterministic results -->
<seed>1714060370</seed>

<!-- ========================== TEAM 1 ========================= -->
<entity>
<team_id>1</team_id>
<team_id>1</team_id>
<color>77 77 255</color>
<count>1</count>
<health>1</health>

<variance_x>20</variance_x>
<variance_y>20</variance_y>
<variance_z>10</variance_z>

<x>-1000</x>
<y>0</y>
<z>200</z>
<heading>0</heading>
<heading>0</heading>

<autonomy>ROSControl</autonomy>
<motion_model>JSBSimModel</motion_model>
<controller>JSBSimModelControllerHeadingPID</controller>
<script_name>rascal_piedmont.xml</script_name>

<controller>JSBSimControlControllerDirect</controller>
<motion_model>JSBSimControl</motion_model>
<script_name>rascal_no_autopilot.xml</script_name>
<visual_model>zephyr-blue</visual_model>

<base>
<latitude>35.721112</latitude>
<longitude>-120.770305</longitude>
<altitude>300</altitude>
<radius>25</radius>
<opacity>1.0</opacity>
</base>

</entity>

<!--
<entity>
<team_id>2</team_id>
<team_id>2</team_id>
<color>77 77 255</color>
<count>10</count>
<health>1</health>
Expand All @@ -87,18 +80,19 @@
<heading>180</heading>
<autonomy>Straight</autonomy>
<autonomy>Straight</autonomy>
<motion_model>JSBSimModel</motion_model>
<controller>JSBSimModelControllerHeadingPID</controller>
<script_name>rascal_piedmont.xml</script_name>
<script_name>rascal_piedmont.xml</script_name>
<visual_model>zephyr-red</visual_model>
<base>
<latitude>35.719961</latitude>
<longitude>-120.767304</longitude>
<altitude>300</altitude>
<radius>25</radius>
</base>
</base>
</entity>

-->

</runscript>

0 comments on commit ccebf8c

Please sign in to comment.