How to use ros and stm32 communication
I would like to use stm32 to write the motor driver, use ROS to control, but I do not know how to use rosserial and stm32 communication.
ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
I would like to use stm32 to write the motor driver, use ROS to control, but I do not know how to use rosserial and stm32 communication.
Hello,
It will depend on which framework you use to program your microcontroller.
For example there is already rossserial-mbed
that works with boards supported by mbed.
If you are not using mbed, you have to create the interface in the hardware file. Basically, you have to provide a method to write a byte on a buffered serial port, a method to read a byte from a buffered serial port and a method to give the time elapsed since the beginning of the program in milliseconds.
For example :
Everything is explained in the wiki.
(Edited for better formatting)
Thanks very much,I have found rosserial_stm32f1 package(https://github.com/spiralray/stm32f1_rosserial.git),but this project has some error when i run it .So i want to move roslib in this project to stm32 stlibrary,then using topic communicate with ros,What do you think about it?
I have never used stm32plus so I cannot help you with this library. In the meantime, I have fixed the issue with the one using ChibiOS. And I am using it successfully right now ( https://github.com/romainreignier/rob... ).
I can give you a simple example on how to run rosserial with ChibiOS but the difficulty is to use the several stm32 peripherals. No, I think, the best for you is to create a rosserial hardware file for the stm32 environnement you are used to. Maybe I can help you. Whick frameworks it is?
Ok but which library do you use to program it?
The easiest way is to use the Arduino port for STM32F1 from stm32duino.
I have just added support for it in rosserial
, I hope it will be merged soon (PR).
Asked: 2017-04-15 07:04:14 -0600
Seen: 9,851 times
Last updated: Apr 24 '17
About rosserial example at stm32f4 board
Rosserial via ethernet on mbed platform STM32 NUCLEO
Slower execution speed leading to Lost Sync With Device in STM32F103
Using Float32MultiArray with RosSerial
About rosserial_stm32 on STM32 L4 series
About rosserial_stm32 on STM32 Nucleo L4 series
Unable to sync with device error when porting rosserial to STM32F7 Discovery