BCLab-UNM / SC2

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

Fix brakes #66

Closed Carter90 closed 4 years ago

Carter90 commented 4 years ago

Scoot.py:

Fixed the brakes service call to comply with the latest srcp2 changes Added lots of checks and ways to call scoot's brake method Added and using _brake_ramp to control the speed/pressure/time that the brakes are applied

Driver.py:

using the ros param MAX_BRAKES for the max pressure uses a copy of the same _brake_ramp method in scoot Note: rover will be more jerky as when its not driving it will not be coasting like before, if we don't like that we can call scoots brakes in all the behaviors when they want to stop

Will resolve #40

There are 2 separate things to test the driver changes

  1. that can but done by just watching the autonomous behavior so no changes to task would be needed and/or disabling task and calling the drive methods.
  2. disabling task and calling the brake service while rolling/or on a steep slope, make sure to not be sending a twist message to the skidsteer controller as that will do nasty things

rosrun teleop_twist_keyboard teleop_twist_keyboard.py cmd_vel:=/scout_1/skid_cmd_vel

@NOTE: to properly test the scoot changes you will need to disable task from being launched as it will interfere with testing to do that you will need to comment out 3 lines in src/scoot/src/MinCore.py

#launcher = roslaunch.scriptapi.ROSLaunch()
#launcher.start()
#launcher.launch(task_node)