Skip to content

TiejunMS/micro_ros_azure_rtos_app

 
 

Repository files navigation



micro-ROS app for Microsoft Azure RTOS

CI

This example application has been tested in Azure RTOS 6.1.7 and STMicroelectronics B-L475E-IOT01A.

Usage

  1. Install Visual Studio Code and Docker engine

  2. Clone this repo. See here for best practices on Windows:

git clone https://github.com/TiejunMS/micro_ros_azure_rtos_app
  1. Open the micro_ros_azure_rtos_app folder in VSCode dev container by Remote-Containers: Reopen in Container command. See tutorial here

  2. Update WIFI credentials in app/secrets.h

  3. Update IP address of your PC in app/main.c

  4. Configure the CMake project

cmake -Bbuild -GNinja
  1. Build the CMake project
cmake --build build
  1. Run microROS agent in VSCode terminal
ros2 run micro_ros_agent micro_ros_agent udp4 --port 8888
  1. Download build/app/stm32l475_azure_iot.bin and copy it to USB disk shown in your PC

Output

When the device is connected, the output from microROS terminal is,

[1636002041.354267] info     | UDPv4AgentLinux.cpp | init                     | running...             | port: 8888
[1636002041.355627] info     | Root.cpp           | set_verbose_level        | logger setup           | verbose_level: 4
[1636002048.937087] info     | Root.cpp           | create_client            | create                 | client_key: 0xXXXXXXXX, session_id: 0xXX
[1636002048.937165] info     | SessionManager.hpp | establish_session        | session established    | client_key: 0xXXXXXXXX, address: xx.xx.xx.xx:xxxx

Output from serial is,

Starting micro-ROS thread

Initializing WiFi
        Module: ISM43362-M3G-L44-SPI
        MAC address: xx:xx:xx:xx:xx:xx
        Firmware revision: C3.5.2.5.STM
        Connecting to SSID 'xxx'
SUCCESS: WiFi connected to xxx

Initializing DHCP
        IP address: xx.xx.xx.xx
        Gateway: xx.xx.xx.xx
SUCCESS: DHCP initialized

Initializing DNS client
        DNS address: xx.xx.xx.xx
SUCCESS: DNS client initialized

Sent: 0
Sent: 1
Sent: 2
...

Purpose of the Project

This software is not ready for production use. It has neither been developed nor tested for a specific use case. However, the license conditions of the applicable Open Source licenses allow you to adapt the software to your needs. Before using it in a safety relevant setting, make sure that the software fulfills your requirements and adjust it according to any applicable safety standards, e.g., ISO 26262.

License

This repository is open-sourced under the Apache-2.0 license. See the LICENSE file for details.

For a list of other open-source components included in ROS 2 system_modes, see the file 3rd-party-licenses.txt.

Known Issues/Limitations

There are no known limitations.

About

micro-ROS app for Azure RTOS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 94.4%
  • HTML 5.2%
  • Other 0.4%