So following the following thread:
Hi @Elianne_Sacher and @Brad_Towle , I want to let you know that we have just released a new version of the Husarion OS where the default setup allows the ROS 2 topic discovery over the local network.
Also a dynamic ROS_DOMAIN_ID variable setup works with Micro-ROS based firmware for ROSbot!
To update the OS image for ROSbot, follow these steps:
Download the Husarion OS image for your Husarion robot SBC: Installing Husarion OS | Husarion
Install that image on the robot
During the initial set…
I was able to download the new image and flash the sd card. I can now run microros and rosbot and have the topics sent to remote computers.
I cannot run rplidar or astra now.
I am running image husarion-rpi-ros2-humble-2023-07-18.img.xc
I had to change the owner of the .ros folder to husarion in order to get ros2 introspection to run on the robot.
RPlidar and astra worked fine with the older image, so I know its not a hardware issue.
Any ideas?
Cheers,
Brad Towle
This is the error from the log file:
cat sllidar_node_69_1690998227688.log
[INFO] [1690998227.753606359] [sllidar_node]: SLLidar running on ROS2 package SLLidar.ROS2 SDK Version:1.0.1, SLLIDAR SDK Version:2.0.0
[ERROR] [1690998227.806797067] [sllidar_node]: Error, operation time out. SL_RESULT_OPERATION_TIMEOUT!
Also astra will start and show topics, but it will not publish anything.
I found the problem with RPLidar. Still working on the ASTRA:
I recentely upgraded to the new image released on July 18.
I had to fix the following two errors. (I re-installed the image twice).
Bug 1 and fix:
The .ros file in the home directory was set to root and Ros2 could not write out logs.
(I fixed this by changing the owner to ‘husarion’)
Bug 2 and fix:
For the RPLidar there is an alias device /dev/ttyRPLIDAR (the permissions are set correct here)
But in the compose file it is hardcoded to /dev/ttyUSB0 which did not have the correct permissions. Therefore, I could not run rplidar.
I changed the permissions to 777 and it worked, although there is probably a more elegant permission to use.
Cheers,
Dr. Towle
When I made all /dev/tty* permission 777 Astra worked. I was unable to figure out which specific tty Astra used.
@Brad_Towle
Thanks for moving your doubts and thoughts to a new thread. We’ll take a close look at this
Best regards
Jan Brzyk
@Brad_Towle
Please write in order what commands to enter into the terminal after burning a new image.
Sure:
I first flashed the sd card, then boot in with the usb/ethernet connection.
(setup wifi) sudo nano /etc/netplan/0…
Then applied the netplan.
sudo setup_robot_configuration rosbot_2r ros2_humble
docker compose pull
docker stop rosbot microros || true && docker run
–rm -it --privileged
husarion/rosbot:humble
/flash-firmware.py /root/firmware.bin
docker compose up -d rosbot microros rplidar
Rplidar and astra would not publish anything until I unlocked the tty ports.
Hello,
To fix all mentioned issues in 18-07-2023
Husarion OS image you need to:
Add those two lines to the end of the /etc/udev/rules.d/10-local.rules
file
KERNEL=="ttyUSB*", GROUP="dialout", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="2bc5", MODE="0666"
Execute:
sudo udevadm control --reload-rules && sudo udevadm trigger
If ~/.ros
folder is owned by a root
user remove it first:
sudo rm -rf ~/.ros
On a just burned system image execute one of two:
a) Utility script:
./ros_driver_start.sh
b) Docker Compose CLI way
mkdir -p ~/.ros
docker compose up
Best regards
Jan Brzyk
Sweet thank you. I wasn’t sure which rule file to modify.
@Brad_Towle
You will also need to rename the file:
/etc/udev/rules.d/10-local.rules
to → /etc/udev/rules.d/99-local.rules
After reboot, follow the rest of the instructions above.
Best regards
Jan Brzyk