Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
30 changes: 30 additions & 0 deletions misc/four_scout_one_excavatior_one_hauler.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# ------------------------------------------------------------------------------
# Robot team configuration
#
# For strict competition runs, this is the ONLY part of this file that will
# be used
team:
scouts: 4
excavators: 1
haulers: 1

# ------------------------------------------------------------------------------
# Simulation Configuration
#
# Competitors are free to set these for their own debugging, but these
# values will be ignored by the competition run
#
seed: 42
use_gui: true
use_noise: false
start_power_percentage: 100.0
start_paused: false
duration: 86400 # seconds
spawn_center_x: 0
spawn_center_y: 0
spawn_center_z: 10
generate_heightmap: true
heightmap_path: ~/.gazebo/runtime_heightmap.png
system_monitor_enabled: true
run_endless: true

23 changes: 23 additions & 0 deletions src/scoot/launch/final_round.launch
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,27 @@
<arg name="search" value="searchRandomWalk"/>
<arg name="mode" value="auto"/>
</include>
<include file="$(find scoot)/launch/scoot.launch">
<arg name="name" value="small_scout_2"/>
<arg name="search" value="searchRandomWalk"/>
<arg name="mode" value="auto"/>
</include>
<include file="$(find scoot)/launch/scoot.launch">
<arg name="name" value="small_scout_3"/>
<arg name="search" value="searchRandomWalk"/>
<arg name="mode" value="auto"/>
</include>
<include file="$(find scoot)/launch/scoot.launch">
<arg name="name" value="small_scout_4"/>
<arg name="search" value="searchRandomWalk"/>
<arg name="mode" value="auto"/>
</include>
<include file="$(find scoot)/launch/scoot.launch">
<arg name="name" value="small_excavator_1"/>
<arg name="mode" value="auto"/>
</include>
<include file="$(find scoot)/launch/scoot.launch">
<arg name="name" value="small_hauler_1"/>
<arg name="mode" value="auto"/>
</include>
</launch>
94 changes: 53 additions & 41 deletions src/scoot/src/Scoot.py

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion src/scoot/src/behaviors/excavator/dig.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ def main(task=None):
scoot = Scoot("excavator")
scoot.start(node_name='dig')
rospy.loginfo('Dig Started')
scoot.brake()
# Check Bucket status
if scoot.bucket_info().mass_in_bucket <= 10:
# Reset to "home"
Expand Down
1 change: 0 additions & 1 deletion src/scoot/src/behaviors/excavator/dropoff.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ def main(task=None):
scoot = Scoot("excavator")
scoot.start(node_name='dropoff')
rospy.loginfo('Dropoff Started')
scoot.brake()
# @TODO check if have anything in bucket, verify state meh can can handle a value for said state
# @TODO: check for message from hauler
scoot.move_mount(math.pi)
Expand Down
31 changes: 18 additions & 13 deletions src/scoot/src/behaviors/excavator/goto_volatile.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import sys
import rospy
import math
from Scoot import Scoot, Location, VolatileException, ObstacleException

def main(task=None):
Expand All @@ -15,19 +16,23 @@ def main(task=None):
scoot = Scoot("excavator")
scoot.start(node_name='goto_volatile')
rospy.loginfo('Goto Volatile Started')
vol_pose = scoot.get_closest_vol_pose()
try:
scoot.drive_to(vol_pose)
except ObstacleException:
pass
except VolatileException:
sys.exit(0) # "succeeded" # @TODO: might retest mass as this volatile might be almost exhausted
# @TODO: obstacle avoidance calls should live here
scoot.brake()
if scoot.OdomLocation.at_goal(vol_pose, 2.0):
sys.exit(0) # "succeeded"
else:
sys.exit(-1) # "failed"
scoot.move_shoulder_yaw(-math.pi)
rospy.sleep(3)
vol_pose = scoot.get_closest_vol_point()
# @TODO make a while loop or change state meh
if vol_pose:
try:
scoot.drive_to(vol_pose)
except ObstacleException:
pass
except VolatileException:
sys.exit(0) # "succeeded" # @TODO: might retest mass as this volatile might be almost exhausted
# @TODO: obstacle avoidance calls should live here
if scoot.OdomLocation.at_goal(vol_pose, 2.0):
sys.exit(0) # "succeeded"
else: # no volitile
rospy.sleep(5)
sys.exit(-1) # "failed"


if __name__ == '__main__':
Expand Down
2 changes: 0 additions & 2 deletions src/scoot/src/behaviors/scout/goto_repair_station.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ def main(task=None):
result = go_to.goto(repair_station_pose.x, repair_station_pose.y, 0, 0)

scoot.drive(0, ignore=Obstacles.IS_LIDAR | Obstacles.IS_VOLATILE)
scoot.brake()

if result:
rospy.loginfo('goto_repair_station: succeeded')
sys.exit(0)
Expand Down
1 change: 0 additions & 1 deletion src/scoot/src/behaviors/scout/searchRandomWalk.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ def main(task=None):
ignoring = Obstacles.CUBESAT | Obstacles.HOME_FIDUCIAL | Obstacles.HOME_LEG | Obstacles.VISION_VOLATILE

random_walk(num_moves=50)
scoot.brake()
rospy.loginfo("I'm probably lost!") # @ TODO add a reorient state in the task state meh
sys.exit(1)

Expand Down