BCLab-UNM / SC2

Swarmathon Team Code for the NASA Space Challenge 2 Competition
MIT License
2 stars 0 forks source link

Update driver for obstacles #35

Closed Carter90 closed 4 years ago

Carter90 commented 4 years ago

~~In progress: Currently tracking bug when an obstacle message is received and state machine exits with correct code but does not send a twist stop~~

Dependent on #32 being tested(someone else)/merged

EDIT ADDITION:

Keep in mind from src/scoot/msg/MoveResult.msg MoveResult.OBSTACLE_LASER == 1 MoveResult.OBSTACLE_VOLATILE == 2

Any service calls to the driver(control) will return MoveResult values (1/2 right now) Okay let find some volatiles and try to run into things

from obstacle.msg import Obstacles
scoot.turn(-math.pi/8) # turn to the right can
scoot.drive(-1,ignore=Obstacles.IS_LIDAR) # will not stop if Lidar is blocked, try to only do this when backing up, or if you are subscribed to the Lidar and are carefully driving closer
scoot.turn(math.pi,ignore=Obstacles.IS_VOLATILE) # turn around while ignoring the Volatile, will have to do after you find and report a volatile is to move away from it

#the most dangerous thing you can do right now to drive a lot and ignore obstacles
scoot.drive(20,ignore=Obstacles.IS_LIDAR|Obstacles.IS_VOLATILE)
Carter90 commented 4 years ago

Note: this branch does not have the change(3a13f8c313e7b9cc537ee22a20eb94978f9df45e) that is on master for driving backwards