diff --git a/README.md b/README.md index 365dcde..64a47ff 100644 --- a/README.md +++ b/README.md @@ -53,3 +53,123 @@ catkin config -DCMAKE_BUILD_TYPE=Release -DSIM=0 -DKIN=1 catkin build ```` +## Autonomy Stack Notes: + +1. Based on the robot launch its respective launch file from the rover_launch ros pkg. +### Optimus +``` +roslaunch rover_launch rover_optimus.launch +``` +### Jean rover +``` +roslaunch rover_launch rover_agx.launch +``` +### Spot +``` +sudo route add -net 192.168.50.0/24 gw 192.168.1.3 # Route to the robot not setup yet, so do this to communicate with the robot. +roslaunch rover_launch spot.launch +``` +2. Use a computer with valid ROS installation to act as a base station, on the base station launch the +base station launch script. Make sure you have a ps4 joystick paired or connected via USB for control. + +**Note: Make sure the IP of the robot and your Ip are correct in the script** + +Get to the location of the script + +``` +cd src/rover_launch/launch_scripts +``` + +### Optimus +``` +bash bash_optimus.sh +``` + +### Jean rover +``` +bash bash_tars.sh +``` +### Spot +``` +bash bash_spot.sh +``` +Now one should be able to visualize the autonomy module components (pointcloud, images, tf, etc.), +and control the robot manualy based on the commands below. + +### Local Planner Joystick Mapping + +``` +# Teleop configuration for PS4 joystick. +# Left thumb-stick up/down/left/right for forward/backward translation +# Right thumb-stick left/right for yaw +# Left shoulder button for obstacle enabled +# Right shoulder button for obstacle disabled +# +# L1 R1 +# L2 R2 +# _=====_ _=====_ +# / _____ \ / _____ \ +# +.-'_____'-.------------------------------.-'_____'-.+ +# / | | '. S O N Y .' | _ | \ +# / ___| /|\ |___ \ / ___| /_\ |___ \ (Y) +# / | | | ; ; | _ _ || +# | | <--- ---> | | | ||_| (_)|| (X) (B) +# | |___ | ___| ; ; |___ ___|| +# |\ | \|/ | / _ ____ _ \ | (X) | /| (A) +# | \ |_____| .','" "', (_PS_) ,'" "', '. |_____| .' | +# | '-.______.-' / \ / \ '-._____.-' | +# | | LJ |--------| RJ | | +# | /\ / \ /\ | +# | / '.___.' '.___.' \ | +# | / \ | +# \ / \ / +# \________/ \_________/ +# +# +# BUTTON Function +# L1 Disable Obstacles +# L2 Not defined +# R1 Enable Obstacles +# R2 Not defined +# A Stop enable +# B Stop release +# X Manual control +# Y Autonomy control +# +# AXIS Value +# Left Horiz. Not defined +# Left Vert. Forward/Backward +# Right Horiz. Yaw +# Right Vert. Not defined +``` + +### Exploration planning + +Start the exploration using the following commands by calling the rc cmd topic. + +``` +rosservice call /buzzcmd "{broadcast: false, command: 1, confirmation: 0, param1: 0.0, param2: 0.0, param3: 0.0, + param4: 0.0, param5: 0.0, param6: 0.0, param7: 0.0}" +``` + +The command can be replaced with any of the following to switch the state of the robot: +``` +No_cmd = 0 +Turnoff_cmd = 21 +Explore_cmd = 1 +Home_cmd = 2 +Wp_cmd = 3 +Find_object_cmd = 4 # Not Implemented +Sit_cmd = 5 +Stand_cmd = 6 +Dance_cmd = 7 # Not Implemented +all_robots_explore_cmd = 8 # Not Implemented +all_robots_home_cmd = 9 # Not Implemented +``` +### Troubleshooting + +1. Robot too close to Obstacles: If the robot gets too close the planner states clear the space around the robot. Ideally one can take back control and move the robot a little bit to resolve the warning and re-enable exploration. +2. Planner unable to find feasible path: Either try moving the robot, switch to turnedoff and back to explore, Move the robot a bit in the prefered direction and switch state -> turnedoff -> explore. +3. Robot connection bad: Restart the communication hub radios `radio0` from luci. +4. Rover driver not starting (ROSBuzz complaining Waiting for pose): check if the can bus is up and sending data using: `candump can0`, if not bring it up and using `bringup can` script from the driver package. Some robots have a service setup check sudo systemctl status bringupcan.service +5. Vector nav driver not starting: check the /dev/vectornav or /dev/USB0 is there based on the device. \ No newline at end of file