Closed PhilShaw852 closed 4 months ago
Hi @PhilShaw852,
Thank you for the information. We made a typo, because we run this command via ros2 run
.
Let me know if it helped.
Thanks Rafal, I now get: ros2 run rosbot_utils flash_firmware
Flashing /home/husarion/ros2_ws/install/rosbot_utils/share/rosbot_utils/firmware/firmware-0.11.0.bin over /dev/ttyUSB0 System architecture: aarch64 Device: RPi
Traceback (most recent call last):
File "/home/husarion/ros2_ws/install/rosbot_utils/lib/python3.10/site-packages/rosbot_utils/flash-firmware.py", line 136, in
You need also install stm32flash
, use sudo apt install stm32flash
.
Unfortunately I think there is still an issue. I have also now lost the ability to teleop the robot.
husarion@my-robot:~/ros2_ws$ ros2 run rosbot_utils flash_firmware Flashing /home/husarion/ros2_ws/install/rosbot_utils/share/rosbot_utils/firmware/firmware-0.11.0.bin over /dev/ttyUSB0 System architecture: aarch64 Device: RPi
stm32flash 0.5
http://stm32flash.sourceforge.net/
Interface serial_posix: 57600 8E1 Version : 0x31 Option 1 : 0x00 Option 2 : 0x00 Device ID : 0x0413 (STM32F40xxx/41xxx)
Write-UnProtection error! Trying again. Error:
RAN: /usr/bin/stm32flash /dev/ttyAMA0 -u
STDOUT:
STDERR: Failed to read ACK byte Failed to write-unprotect flash
stm32flash 0.5
http://stm32flash.sourceforge.net/
Interface serial_posix: 57600 8E1
Write-UnProtection error! Trying again. Error:
RAN: /usr/bin/stm32flash /dev/ttyAMA0 -u
STDOUT:
STDERR: Failed to read ACK byte
stm32flash 0.5
http://stm32flash.sourceforge.net/
Interface serial_posix: 57600 8E1
Write-UnProtection error! Trying again. Error:
RAN: /usr/bin/stm32flash /dev/ttyAMA0 -u
STDOUT:
STDERR:
WARNING! Write-UnProtection went wrong. stm32flash 0.5
http://stm32flash.sourceforge.net/
Interface serial_posix: 57600 8E1
Read-UnProtection error! Trying again. Error:
RAN: /usr/bin/stm32flash /dev/ttyAMA0 -k
STDOUT:
STDERR: Failed to read ACK byte Unexpected reply from device on command 0x01
stm32flash 0.5
http://stm32flash.sourceforge.net/
Interface serial_posix: 57600 8E1 Version : 0x31 Option 1 : 0x00 Option 2 : 0x00 Device ID : 0x0413 (STM32F40xxx/41xxx)
stm32flash 0.5
http://stm32flash.sourceforge.net/
Using Parser : Raw BINARY Interface serial_posix: 115200 8E1
Flashing error! Trying again. Error:
RAN: /usr/bin/stm32flash /dev/ttyAMA0 -v -w /home/husarion/ros2_ws/install/rosbot_utils/share/rosbot_utils/firmware/firmware-0.11.0.bin -b 115200
STDOUT:
STDERR: Failed to init device.
stm32flash 0.5
http://stm32flash.sourceforge.net/
Using Parser : Raw BINARY Interface serial_posix: 115200 8E1 Version : 0x31 Option 1 : 0x00 Option 2 : 0x00 Device ID : 0x0413 (STM32F40xxx/41xxx)
Flashing error! Trying again. Error:
RAN: /usr/bin/stm32flash /dev/ttyAMA0 -v -w /home/husarion/ros2_ws/install/rosbot_utils/share/rosbot_utils/firmware/firmware-0.11.0.bin -b 115200
STDOUT:
STDERR: Failed to read memory at address 0x08000000
stm32flash 0.5
http://stm32flash.sourceforge.net/
Using Parser : Raw BINARY Interface serial_posix: 115200 8E1
Flashing error! Trying again. Error:
RAN: /usr/bin/stm32flash /dev/ttyAMA0 -v -w /home/husarion/ros2_ws/install/rosbot_utils/share/rosbot_utils/firmware/firmware-0.11.0.bin -b 115200
STDOUT:
STDERR: Failed to read ACK byte
WARNING! Flashing went wrong. Done! Firmware flashing completed successfully.
Please make sure that no programs using the firmware are running in the background, as it is not possible to use the port when it is already occupied.
docker ps -a
command whether there are any running processes. If there are any, please remove them.ros2 node list
If this doesn't work, try using the ~/flash_firmware.sh
script. If this script does not exist, I recommend updating the system to the latest Husarion OS
https://husarion.com/software/os/installation/.
Rosbot-2R (ROS2 Humble)
With the command as detailed in the procedure:
ros2 launch rosbot_utils flash_firmware
The response below is seen:
file 'flash_firmware' was not found in the share directory of package 'rosbot_utils' which is at '/home/husarion/ros2_ws/install/rosbot_utils/share/rosbot_utils'
Any suggestions?