Skip to content

Commit

Permalink
Fixed path issues
Browse files Browse the repository at this point in the history
  • Loading branch information
varundevsukhil committed Apr 26, 2020
1 parent 4a2507d commit cd7e7e4
Show file tree
Hide file tree
Showing 17 changed files with 3,349 additions and 49 deletions.
23 changes: 10 additions & 13 deletions config/one_car.launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@
default = 'false'/>
<arg name = 'paint'
default = 'Yellow'/>
<!--
<arg name = 'remote_control'
default = 'false'/>
<arg name = 'keyboard_control'
default = 'false'/> -->
default = 'false'/>
<arg name = 'world_name'
default = 'race_track'/>

<!-- run gazebo by default only once -->
<group if = '$(arg run_gazebo)'>
Expand All @@ -29,8 +30,6 @@
value = 'true'/>

<!-- simulator arguments -->
<arg name = 'world_name'
default = 'race_track'/>
<arg name = 'gui'
default = 'true'/>
<arg name = 'run_camera'
Expand All @@ -49,39 +48,37 @@
<!-- launch gazebo with track -->
<include file = '$(find gazebo_ros)/launch/empty_world.launch'>
<arg name = 'world_name'
value = '$(find spring_2020_virtual_class)/world/$(arg world_name).world'/>
value = '$(find f1tenth-sim)/world/$(arg world_name).world'/>
<arg name = 'gui'
value = '$(arg gui)'/> </include> </group>

<!-- check if remote control is required -->
<!--
<group if = '$(arg remote_control)'>
<node name = 'joy_plugin'
pkg = 'joy'
type = 'joy_node'>
<param name = 'autorepeat_rate'
value = '20.0'/> </node>
<node name = 'remote_control'
pkg = 'spring_2020_virtual_class'
pkg = 'f1tenth-sim'
type = 'remote_control.py'
args = '$(arg car_name)'/> </group> -->
args = '$(arg car_name)'/> </group>

<!-- check if keyboard control is required -->
<!--
<group if = '$(arg keyboard_control)'>
<node name = 'keyboard_plugin'
pkg = 'spring_2020_virtual_class'
pkg = 'f1tenth-sim'
type = 'keyboard_teleop.py'
args = '$(arg car_name)'/> </group> -->
args = '$(arg car_name)'/> </group>

<!-- reset racecar to pit stop -->
<node name = '$(arg car_name)_pit_stop_reset'
pkg = 'spring_2020_virtual_class'
pkg = 'f1tenth-sim'
type = 'set_racecar_state.py'
args = '$(arg car_name)'/>

<!-- spawn car using the set global parameters -->
<include file = '$(find spring_2020_virtual_class)/config/vehicle_class.launch.xml'>
<include file = '$(find f1tenth-sim)/config/vehicle_class.launch.xml'>
<arg name = 'car_name'
value = '$(arg car_name)'/>
<arg name = 'x_pos'
Expand Down
6 changes: 3 additions & 3 deletions config/vehicle_class.launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<!-- load joint controller configurations from YAML file to parameter server -->
<group ns = '$(arg car_name)'>
<rosparam file = '$(find spring_2020_virtual_class)/config/control.yaml'
<rosparam file = '$(find f1tenth-sim)/config/control.yaml'
command = 'load'/> </group>

<!-- load unique controller parameters -->
Expand All @@ -36,7 +36,7 @@
<!-- urdf xml robot description loaded on the Parameter Server, converting the xacro into a proper urdf file-->
<param name = '$(arg car_name)/robot_description'
command = '$(find xacro)/xacro
"$(find spring_2020_virtual_class)/urdf/macros.xacro" robot_name:=$(arg car_name) robot_skin:=$(arg paint)'/>
"$(find f1tenth-sim)/urdf/macros.xacro" robot_name:=$(arg car_name) robot_skin:=$(arg paint)'/>

<!-- push robot_description to factory and spawn robot in gazebo -->
<node name = '$(arg car_name)_spawn_model'
Expand Down Expand Up @@ -77,7 +77,7 @@

<!-- launch base controller -->
<node name = 'control_plugin'
pkg = 'spring_2020_virtual_class'
pkg = 'f1tenth-sim'
type = 'control_plugin.py'
args = '$(arg car_name)'
output = 'screen'/> </group>
Expand Down
35 changes: 35 additions & 0 deletions launch/racecar.access
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?xml version='1.0'?>

<launch>

<!-- global variables -->
<arg name = 'car_name'
default = 'car_1'/>
<arg name = 'keyboard_teleop'
default = 'true'/>
<arg name = 'listen_offboard'
default = 'false'/>

<!-- launch rviz with mapping configuration -->
<node name = 'remote_visualization'
pkg = 'rviz'
type = 'rviz'
args = '-d $(find f1tenth-sim)/rviz/$(arg car_name).rviz'/>

<group ns = '$(arg car_name)'>
<!-- bring up command multiplexer -->
<node name = 'keyboard_teleop'
pkg = 'f1tenth-sim'
type = 'keyboard_teleop.py'
args = '$(arg car_name)'
output = 'screen'/>

<!-- bring up command multiplexer -->
<node name = 'command_multiplexer'
pkg = 'f1tenth-sim'
type = 'command_multiplexer.py'
args = '$(arg car_name)
$(arg listen_offboard)'
output = 'screen'/> </group>

</launch>
47 changes: 30 additions & 17 deletions launch/simulator.master
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,23 @@

<launch>

<!-- global variables -->
<arg name = 'world_name'
default = 'race_track'/>

<!-- global map server -->
<node name = 'global_map_server'
pkg = 'map_server'
type = 'map_server'
args = '$(find spring_2020_virtual_class)/map/race_track.yaml'
args = '$(find f1tenth-sim)/map/race_track.yaml'
output = 'screen'>
<param name = 'frame_id'
value = 'map'/> </node>
<remap from = 'map'
to = '/map'/>

<!-- spawn car_1 and launch Gazebo -->
<include file = '$(find spring_2020_virtual_class)/config/one_car.launch.xml'>
<include file = '$(find f1tenth-sim)/config/one_car.launch.xml'>
<arg name = 'car_name'
value = 'car_1'/>
<arg name = 'x_pos'
Expand All @@ -24,83 +28,92 @@
<arg name = 'paint'
value = 'Yellow'/>
<arg name = 'run_gazebo'
value = 'true'/> </include>
value = 'true'/>
<arg name = 'world_name'
value = '$(arg world_name)'/> </include>

<!-- spawn car_2 -->
<include file = '$(find spring_2020_virtual_class)/config/one_car.launch.xml'>
<!--
<include file = '$(find f1tenth-sim)/config/one_car.launch.xml'>
<arg name = 'car_name'
value = 'car_2'/>
<arg name = 'x_pos'
value = '-7.0'/>
<arg name = 'y_pos'
value = '-5.0'/>
<arg name = 'paint'
value = 'Blue'/> </include>
value = 'Blue'/> </include> -->

<!-- spawn car_3 -->
<include file = '$(find spring_2020_virtual_class)/config/one_car.launch.xml'>
<!--
<include file = '$(find f1tenth-sim)/config/one_car.launch.xml'>
<arg name = 'car_name'
value = 'car_3'/>
<arg name = 'x_pos'
value = '-5.0'/>
<arg name = 'y_pos'
value = '-5.0'/>
<arg name = 'paint'
value = 'Red'/> </include>
value = 'Red'/> </include> -->

<!-- spawn car_4 -->
<include file = '$(find spring_2020_virtual_class)/config/one_car.launch.xml'>
<!--
<include file = '$(find f1tenth-sim)/config/one_car.launch.xml'>
<arg name = 'car_name'
value = 'car_4'/>
<arg name = 'x_pos'
value = '-3.0'/>
<arg name = 'y_pos'
value = '-5.0'/>
<arg name = 'paint'
value = 'Orange'/> </include>
value = 'Orange'/> </include> -->

<!-- spawn car_5 -->
<include file = '$(find spring_2020_virtual_class)/config/one_car.launch.xml'>
<!--
<include file = '$(find f1tenth-sim)/config/one_car.launch.xml'>
<arg name = 'car_name'
value = 'car_5'/>
<arg name = 'x_pos'
value = '-1.0'/>
<arg name = 'y_pos'
value = '-5.0'/>
<arg name = 'paint'
value = 'Green'/> </include>
value = 'Green'/> </include> -->

<!-- spawn car_6 -->
<include file = '$(find spring_2020_virtual_class)/config/one_car.launch.xml'>
<!--
<include file = '$(find f1tenth-sim)/config/one_car.launch.xml'>
<arg name = 'car_name'
value = 'car_6'/>
<arg name = 'x_pos'
value = '1.0'/>
<arg name = 'y_pos'
value = '-5.0'/>
<arg name = 'paint'
value = 'Purple'/> </include>
value = 'Purple'/> </include> -->

<!-- spawn car_7 -->
<include file = '$(find spring_2020_virtual_class)/config/one_car.launch.xml'>
<!--
<include file = '$(find f1tenth-sim)/config/one_car.launch.xml'>
<arg name = 'car_name'
value = 'car_7'/>
<arg name = 'x_pos'
value = '3.0'/>
<arg name = 'y_pos'
value = '-5.0'/>
<arg name = 'paint'
value = 'Black'/> </include>
value = 'Black'/> </include> -->

<!-- spawn car_8 -->
<include file = '$(find spring_2020_virtual_class)/config/one_car.launch.xml'>
<!--
<include file = '$(find f1tenth-sim)/config/one_car.launch.xml'>
<arg name = 'car_name'
value = 'car_8'/>
<arg name = 'x_pos'
value = '5.0'/>
<arg name = 'y_pos'
value = '-5.0'/>
<arg name = 'paint'
value = 'White'/> </include>
value = 'White'/> </include> -->

</launch>
Loading

0 comments on commit cd7e7e4

Please sign in to comment.