Skip to content

Commit

Permalink
Modify course_out_surveillance
Browse files Browse the repository at this point in the history
    enable large track surveillance
    use rosparam
  • Loading branch information
F0CACC1A committed Mar 31, 2021
1 parent 1d03243 commit dc8f80d
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 7 deletions.
7 changes: 7 additions & 0 deletions ai_race/sim_environment/config/course_size_large.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
course_size_lx: 5.22
course_size_ly: 3.96
course_size_r : 3.3
course_size_lx_out: 6.75
course_size_ly_out: 8.5


7 changes: 7 additions & 0 deletions ai_race/sim_environment/config/course_size_small.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
course_size_lx: 1.2
course_size_ly: 1.04
course_size_r : 0.75
course_size_lx_out: 2.25
course_size_ly_out: 2.85


7 changes: 6 additions & 1 deletion ai_race/sim_environment/launch/sim_environment.launch
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,12 @@
<arg name="track_name" value="medium_track_plane_w_wall_large.world" />
<arg name="gui" value="$(arg gui)" />
<arg name="controller" value="$(arg controller)" />
<arg name="dynamic_recon" value="false" />
<arg name="dynamic_recon" value="True" />
<arg name="with_auto_recovery" value="true" /> <!-- for large field debug -->
<arg name="arrow" value="$(arg arrow)" />
<arg name="record" value="$(arg record)" />
<arg name="play" value="$(arg play)" />
<arg name="track_size" default="2"/>
<arg name="robot_pos" value="-x 5.75 -y 0 -z 0 -Y 1.57"/>
<arg name="camera_pos" value="-x 5.15 -y 0 -z 0 -Y 0.0"/>
<arg name="godeye_pos" value="-x 0 -y 0 -z 4.0 -Y 0.0"/>
Expand All @@ -109,6 +110,7 @@
<arg name="arrow" value="$(arg arrow)" />
<arg name="record" value="$(arg record)" />
<arg name="play" value="$(arg play)" />
<arg name="track_size" default="1"/>
<arg name="perspective" value="2" />
</include>
</group>
Expand All @@ -124,6 +126,7 @@
<arg name="arrow" value="$(arg arrow)" />
<arg name="record" value="$(arg record)" />
<arg name="play" value="$(arg play)" />
<arg name="track_size" default="1"/>
<arg name="perspective" value="2" />
</include>
</group>
Expand All @@ -139,6 +142,7 @@
<arg name="arrow" value="$(arg arrow)" />
<arg name="record" value="$(arg record)" />
<arg name="play" value="$(arg play)" />
<arg name="track_size" default="1"/>
<arg name="perspective" value="2" />
</include>
</group>
Expand All @@ -154,6 +158,7 @@
<arg name="arrow" value="$(arg arrow)" />
<arg name="record" value="$(arg record)" />
<arg name="play" value="$(arg play)" />
<arg name="track_size" default="1"/>
<arg name="perspective" value="2" />
</include>
</group>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?xml version="1.0"?>
<launch>
<!-- roslaunch arguments -->
<arg name="show_rviz" default="false"/>
Expand All @@ -11,6 +12,7 @@
<arg name="arrow" default="true" />
<arg name="record" default="false" />
<arg name="play" default="false" />
<arg name="track_size" default="1"/> <!-- 1:small, 2:large 3... -->
<arg name="perspective" default="1" />
<arg name="robot_pos" default="-x 1.6 -y 0 -z 0 -Y 1.57" />
<arg name="camera_pos" default="-x 1.0 -y 0 -z 0 -Y 0" />
Expand Down Expand Up @@ -108,6 +110,13 @@
<node pkg="sim_environment" type="course_out_surveillance.py" name="course_out_surveillance" output="screen" />
</group>

<group if="$(eval track_size==1)">
<rosparam file="$(find sim_environment)/config/course_size_small.yaml" command="load" />
</group>
<group if="$(eval track_size==2)">
<rosparam file="$(find sim_environment)/config/course_size_large.yaml" command="load" />
</group>

<!-- servo node -->
<node pkg="sim_environment" type="servo_commands.py" name="servo_commands" output="screen" />

Expand Down
12 changes: 6 additions & 6 deletions ai_race/sim_environment/scripts/course_out_surveillance.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
#max speed param
MAX_SPEED_W = 0.5

#Level1 Parameters
Ly = 1.04
Lx = 1.2
r = 0.75
Ly_out = 2.85
Lx_out = 2.25
#Track Size Parameters
Lx = rospy.get_param('/course_size_lx', 1.2)
Ly = rospy.get_param('/course_size_ly', 1.04)
r = rospy.get_param('/course_size_r', 0.75)
Lx_out = rospy.get_param('course_size_lx_out', 2.25)
Ly_out = rospy.get_param('course_size_ly_out', 2.85)

x = 1.6
y = 0.0
Expand Down

0 comments on commit dc8f80d

Please sign in to comment.