This is a part of rosserial repository to communicate with ROS system through a USART for STM32 embedded system.
The original code is focused on STM32F3xx, 4xx, and 7xx series and it uses the STM32CubeIDE or STM32CubeMX HAL.
If you use the package for other series, please edit the following line on src/ros_lib/STM32Hardware.h .
$ cd _targetworkspace (It should contain Inc and Src directories).
$ rosrun rosserial_stm32 make_libraries.py .
Never forget to change the project type to cpp project in STM32CubeIDE or SW4STM32!!
For STM32CubeIDE users: You have to add /Inc directory as a "Source Location" in the project properties(C/C++ General > Paths and Symbols > Source Location).
Make sure your code is working before adding your repo here ;)
Hello World example is a copy of ROSserial chatter but reconfigured to be directly used by STM32CubeIDE.
LEDs control through publishers exampleSend UART rosserial commands controlling LED blinking time. Configured for ST NUCLEO-F401RE.
A simple temperature and pressure example Gather temperature & pressure data and publish them to ROS python client using ST X-NUCLEO-IKS01A2 shield.
Motion and environment multi-publisher sensing example This project is a multi-nodes publishers example with both environment (Pressure, humidity, temperature) and motion (magnetic, accelerometer, 6DOF inertia) sensing. It has been tested on [NUCLEO-F401RE top up with X-NUCLEO-IKS01A2 shield. It also shows how a C++ wrapper could be used to be integrated into a C demonstration code.
fdila's repo, working with STM32CubeIDE and stm32f7 based board, CURRENTLY NOT MAINTAINED
Terminal 1
> cd *rosserial_stm32 dir*
> vagrant up
> vagrant ssh
$ cd rosserial_stm32
$ docker-compose up prepare
Then, a sample project is generated on _rosserial_stm32/src/roslib/examples/chatter/ .
Terminal 1
$ docker-compose up srv
Terminal 2
> cd *rosserial_stm32 dir*
> vagrant ssh
$ cd rosserial_stm32
$ docker-compose up client
Terminal 2
[Ctrl+C]
$ exit
Terminal 1
[Ctrl+C]
$ docker stop $(docker ps -q)
$ docker rm $(docker ps -q -a)
$ exit
> vagrant halt