change python to python3:
In branch foxy-devel
https://github.com/nasa-jpl/osr-rover-code/blob/foxy-devel/setup/rpi.md
in section 6
6 Testing serial comm with the Roboclaw motors controllers
Run the roboclawtest.py script with all of the motor addresses:
cd ~/osr_ws/src/osr-rover-code/scripts
python roboclawtest.py 128
python roboclawtest.py 129
python roboclawtest.py 130
python roboclawtest.py 131
python roboclawtest.py 132
ubuntu@AUDACITY:~/osr_ws/src/osr-rover-code/scripts$ python roboclawtest.py 128
Traceback (most recent call last):
File "roboclawtest.py", line 13, in
from roboclaw import Roboclaw
File "/home/ubuntu/osr_ws/src/osr-rover-code/ROS/osr_control/osr_control/roboc law.py", line 2, in
import serial
ImportError: No module named serial
change python to python3: In branch foxy-devel https://github.com/nasa-jpl/osr-rover-code/blob/foxy-devel/setup/rpi.md in section 6 6 Testing serial comm with the Roboclaw motors controllers Run the roboclawtest.py script with all of the motor addresses: cd ~/osr_ws/src/osr-rover-code/scripts python roboclawtest.py 128 python roboclawtest.py 129 python roboclawtest.py 130 python roboclawtest.py 131 python roboclawtest.py 132
ubuntu@AUDACITY:~/osr_ws/src/osr-rover-code/scripts$ python roboclawtest.py 128 Traceback (most recent call last): File "roboclawtest.py", line 13, in
from roboclaw import Roboclaw
File "/home/ubuntu/osr_ws/src/osr-rover-code/ROS/osr_control/osr_control/roboc law.py", line 2, in
import serial
ImportError: No module named serial
ubuntu@AUDACITY:~/osr_ws/src/osr-rover-code/scripts$ python3 roboclawtest.py 128 Connected to /dev/serial1. (1, 'USB Roboclaw 2x7a v4.1.34\n') (1, 0, 128)