GithubHelp home page GithubHelp logo

dlrdaile / rosserial_stm32 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yoneken/rosserial_stm32

0.0 0.0 0.0 94 KB

This is a part of [rosserial](https://github.com/ros-drivers/rosserial) repository to communicate with ROS system through a USART for STM32 embedded system.

License: BSD 2-Clause "Simplified" License

C++ 44.00% Python 9.77% C 27.52% CMake 17.26% Dockerfile 1.46%

rosserial_stm32's Introduction

rosserial_stm32

Note

This is a part of rosserial repository to communicate with ROS system through a USART for STM32 embedded system.

Limitation

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 .

Generate code

$ cd target_workspace (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).

Examples

See src/ros_lib/examples

Share your implementation based on this repo here

Make sure your code is working before adding your repo here ;)

On a Windows machine with virtual machine

Note

  • Make sure Hyper-V is correctly disabled.

Required softwares

  • VirtualBox
  • Vagrant

Run

  1. Generate headers for STM32

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/ros_lib/examples/chatter/ .

  1. Build code with STM32CubeIDE on Windows
  • Open new workspace
  • Import the project as a ac6 System Workbench for STM32 project
  • Open *.ioc file with Device Configuration Tool
  • Generate codes with the tool
  • Change project type to C++ project on Eclipse
  • Only STM32CubeIDE users: Add /Inc directory to "Source Location" on project properties (C/C++ General > Paths and Symbols > Source Location)
  • Build
  1. Launch rosseral server

Terminal 1

$ docker-compose up srv
  1. Flash binary on STM32 and start a demo

Terminal 2

> cd *rosserial_stm32 dir*
> vagrant ssh

$ cd rosserial_stm32
$ docker-compose up client
  1. Stop and remove all containers

Terminal 2

[Ctrl+C]
$ exit

Terminal 1

[Ctrl+C]
$ docker stop $(docker ps -q)
$ docker rm $(docker ps -q -a)
$ exit

> vagrant halt

rosserial_stm32's People

Contributors

yoneken avatar fofolevrai avatar fdila avatar maxi-naeher avatar 5730289021-nn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.