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).
Yes exactly, you add a link in the Arduino IDE and optionally a USB Bootloader and then you code like with an Arduino ( http://wiki.stm32duino.com/index.php?... ). I have never worked with the SPL but if you can communicate with serial and a ring buffer, you can use rosserial.
ROS sent the information is the line speed and angular speed, but I do not have any ideas to imagine through the speed control robot. Although I know the use of PWM, but still particularly at a loss. I hope you can give me some ROS bottom control motor help. thank you.
If you have slam tutorial(It is best to video tutorial.),I hope that you can give me .thank you .It would be nice if could follow you.My Email-892153623@qq.com .
Hi, your latest questions are far from the topic of this one. To keep ros.answers consistent, you should look for other already existing questions and wiki pages (see GMapping / Cartographer and diff_drive_controller for example). Don't forget to mark this one as answered.
About motor control, it is a large question, you should precise your need in another topic. Do you need to control the speed of the motor and send the command through rosserial? Because it is exactly what I am doing in my my project I gave you the link in my second comment.
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