Greetings to all fellow Husarion community members,
I am trying to familiarized myself with the usage of ROSbot 2.0 pro by following the ROS tutorials provided on the Husarion website.
While progressing through Simple kinematics for mobile robot | Husarion I faced the following problem…
Troubled command
roslaunch rosbot_ekf all.launch rosbot_pro:=true
Error generated
Unable to sync with device; possible link problem or link software version mismatch such as hydro rosserial_python with groovy Arduino
I tried to solve this issue based on the following four approaches…
1st approach: Updates and upgrades
sudo apt-get update
sudo apt-get upgrade
Results:
- Spent about 10mins on the upgrade
- Tried running the command that has issue, error still retains.
2nd approach: Update rosserial-python and rosserial-arduino
sudo apt-get install rosserial-kinetic-python
sudo apt-get install rosserial-kinetic-arduino
Results:
- no upgrades required for python, but there was one upgrade for arduino
- Tried running the command that has issue, error still retains.
3rd approach: Ensure baud rate and serial port compatibility
Based on the command which triggered the error, looking into the “all.launch” file from the “rosbot_ekf” package.
serial_port value=“/dev/ttyS4”
serial_baudrate value=“460800”
Looking into the “arduinoHardware.h” file from the “rosserial-arduino” package. It was noticed that their baud rate was indeed different.
ArduinoHardware(SERIAL_CLASS* io , long baud= 57600)
.
.
.
#endif
baud_ = 57600;
Since the error mention the possible mismatch of rosserial-python, I went to analyze the “serial_note.py” file from the “rosserial-python” package. But I believed these parameters will ultimately get overwritten by the “all.launch” file with its inputted values.
port_name = rospy.get_param(‘~port’,‘/dev/ttyUSB0’)
baud = int(rospy.get_param(‘~baud’,‘57600’))
… Procedure A
Edit the “arduinoHardware.h” file to match according to the “all.launch” file baud rate values
sudo nano arduinoHardware.h
Results:
Tried running the command that has issue, error still retains.
… Procedure B
Edit the “all.launch” file to match according to the “arduinoHardware.h” file baud rate values
nano all.launch
Results:
Tried running the command that has issue, error still retains.
(p.s. Perhaps I missed out a mundane step for both A and B. I understand sometimes you need to do a catkin_make? )
4th approach: Ensure serial port is in the correct baud rate
This command checks the baud rate of the serial port
stty -F /dev/ttyS4
This command sets the baud rate for the serial port
stty -F /dev/ttyS4 57600
Results:
Tried running the command that has issue, error still retains.
Conclusion
After trying all these solutions, I think my case does not lie with the issue of baud rate or serial port compatibility, likely to be software version mismatch.
May I kindly know how can I further diagnose this error?