GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - FunPythonEC/uPy-genpy: ROS message python classes generator specifically for uPy.

BranchesTags
Open more actions menu

Latest commit

 

History

12 Commits
12 Commits

Folders and files

NameName
Last commit message
Last commit date
src
src
 
 
tests
tests
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 

Repository files navigation

uPy-genpy

This is a little similar implementation of genpy for uPy. In order to use rosserial with it, having messages classes. For that and automation purposes, this package has been done so that this classes can be done easily. This has been done to be used with uPy rosserial.

Features

  • uPy files gen with publish availability
  • uPy files gen with subscribe availability
  • Services

Installation

Copying source files

In order to use this package the folder ugenpy from src must be copied to the flash memory. I strongly recommend using rshell for this task.

There is also a folder called std_msgs which has all default *.msg files, this folder can also be copied or any other folder with the wanted message types. For memory purposes not all the msg files in that folder must be copied, only the ones that are going to be used.

Using upip

You can also install ugenpy with upip but have in mind the .msg files must be copied, located in the corresponding dir:

import upip
import network
from time import sleep
wlan=network.WLAN(network.STA_IF)
wlan.active(True)
wlan.connect('<ssid>', '<password>')
sleep(5)
upip.install('micropython-genpy')

Note: To use upip you must be connected to WiFi and the files with std_msgs dir must be included manually.

Usage

Suppose there is already the dir std_msgs/ColorRGB.msg and we want to create the uPy file for it, then a script like below can be run:

from ugenpy.message import MessageGenerator
msg=MessageGenerator('std_msgs/ColorRGBA.msg')
msg.create_message()

You could verify it has been created with the following:

import os
os.listdir('std_msgs')

Classes

ugenpy.message.MessageGenerator

Constructor

ugenpy.message.MessageGenerator(addr)

Class responsible of writing the *.py script and message class from *.msg.

  • addr: address where the .msg file is located inside the microcontroller.

Methods

ugenpy.message.MessageGenerator.create_message()

Creates the message from the address already defined in constructor.

About

ROS message python classes generator specifically for uPy.

Topics

esp32genpymessage-filesmicropythonpythonros

Resources

Readme
MIT license
Activity
Custom properties

Stars

3 stars

Watchers

3 watching

Forks

2 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.