[Solved] Problem in bridging CORE2 to ROS network

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?

Hi onezerofive,

Thank you for all information. It seems to be problem with firmware. We can receive this message if the firmware has not been started (it should be done automatically). May I ask you to press “reset” button after turn on your ROSbot and try to launch:i
‘’’
roslaunch rosbot_ekf all.launch rosbot_pro:=true
‘’’
If output still be the same, please run ‘./flash_firmware’ command (script should be in main directory). When the script will finish its job try to launch ‘rosbot_ekf’ one more time.

Please let me know the results.

Best regards,
Hubert

Hi Hubert,

Appreciate the explanation.

Here are my findings upon trying the suggested solutions…

  1. Just a single press, right? Not press and hold?
  1. My machine does not have that script. The only executable(s) are “core2-flasher” and “upboard”

  2. And can I assume that the related files for the command such as “all.launch” and “arduinoHardware.h” are based on their default values (baud rate)?

Hello onezerofive,

According to data you provided here and messages sent directly to me, I conclude that you have ROSbot with image prepared last year. Since that time we have introduced some changes that are not covered with sudo apt upgrade, thus I suggest you to install new image on your device.

You can download image from https://husarion.com/downloads/, then follow system reinstallation manual.

Regards,
Łukasz

1 Like

Hi Łukasz

Noted. I will attempt the new image installation.

Will update the results again once done

Thank you.

Hi onezerofive,

Any update after reinstallation of system?

Best regards,
Hubert

Hi Hubert,

Appreciate for checking in.

Upon reinstalling as stated below

Right after step 10 (selected “ease disk and install Ubuntu”) and received an error stating

GRUB installation failed
The ‘grub-efi-amd64-signed’ package failed to install into /target/. Without the GRUB boot loader, the installed system will not boot.

I did some research and found this [Fix] GRUB installation failed

I have not attempted any of the solutions yet. But I noticed in the BIOS there is no secure boot option?

Please kindly advise, thank you.

Hi onezerofive,

Other user of our community occurred the same issue, please check this topic.

Best regards,
Hubert

1 Like

Hi Hubert,

The re-installation was a success after connecting to the internet.

Thank you Hubert and Łukasz for the help and patience.

1 Like