Closed Simon-Yacoub closed 3 years ago
Here are all of the commands that can be interpreted by the action translator:
drivexy(x,y) - Drive the robot linearly with x(+ forward, - backward) and angularly with y(+ right, - left)
drive(forward) - Drive the robot forward
drive(stop) - Stops the robot
drive(backward) - Drive the robot backward
drive(sleft) - Drive the robot slightly left
drive(sright) - Drive the robot slightly right
drive(bleft) - Drives the robot back and a little left. This is used when the robot gets to close to the wall and needs to realign
drive(avoidright) - Drives in an arc to avoid an obstacle to the robots right.
turn(left) - Does a 45 degree turn left (stops robot first)
turn(right) - Does 45 degree turn right (stops robot first)
station(dock) - Docks the robot
station(undock) - Undocks the robot
Issue when trying to launch: ERROR: cannot launch node of type [saviRoomba/ActionTranslator.py]: can't locate node [ActionTranslator.py] in package [saviRoomba]
Are you still getting this error? I have checked out the branch and made some changes and it is working. First, I double checked the name of the actionTranslator.py script was the same in the roomba.launch file. Then, I did $ chmod +x actionTranslator.py and $ dos2unix actionTranslator.py. Let me know if you want me to push it and feel free to get in touch with me if you want to troubleshoot together.
Also, I am considering moving all scripts into the scripts folder and getting rid of the sensors and Translators folders. This makes it easier to find the scripts and is also important for Docker since it will need all py files in one folder where the Dockerfile is.
Are you still getting this error? I have checked out the branch and made some changes and it is working. First, I double checked the name of the actionTranslator.py script was the same in the roomba.launch file. Then, I did $ chmod +x actionTranslator.py and $ dos2unix actionTranslator.py. Let me know if you want me to push it and feel free to get in touch with me if you want to troubleshoot together.
Thanks, I'm troubleshooting a bit on my own (waiting for a catkin_make at the moment). I'll let you know if I get it working.
Sounds good.
In testing
In testing
- drivexy(1,1) didn't seem to do anything
This command seems to be missing from the ActionTranslator
In testing
- drivexy(1,1) didn't seem to do anything
This command has parameter limits that I was unaware of. The action works. The limits should be documented
drive(avoidRight) is not responding perhaps also add drive(bright) to the actions
--- AvoidRight was not responding because the command is avoidright, all lower case.
I troubleshooted and resolved most of the issues I had.
Two remaining issues:
- parameter limits on drivexy need to be documented
- drive(avoidRight) does not seem to be working
Otherwise, this is OK to merge.
Resolved issue with drivexy comments.
Updated Action Translator to comply so it now uses action(parameter) format and I have added the new drivexy(x,y) action for when you want to give specific x and y inputs instead of generic inputs like "forward". I have also landed on a combination of both using regex and comparing strings to translate actions.