Skip to content

mgtm98/uRos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

uRos

uRos is a Ros implementation for micropython boards. It uses Ros bridge to communicate with Ros Master

Boards Supported

Any board with thread module enabled can use this module like esp32

Features Supported

  • Publisihng Ros Topics
  • Subscribing to Ros Topics
  • Message Generator to create various Messages
  • Standard Ros Messages
  • Ros Services
  • Service Generator to create various Services

Examples

First launch rosbridge roslaunch rosbridge_server rosbridge_tcp.launch

  1. Publish a Ros msg
from uros import *
from uros.std_msgs import std_Bool

uRos = Ros("0.0.0.0", 9090)    #creating new uRos object
msg = std_Bool(data = True)    #creating a Ros string msg object
uRos.publish("uRosTopic", msg) #publishing ros message   
  1. Subscribe to a Ros msg
from uros import *
from uros.std_msgs import std_Bool

def callback(msgObj:Msg_I):                     # Call back function
    print(msgObj.get_data())

uRos = Ros("0.0.0.0", 9090)                     #creating new uRos object
uRos.subscribe("uRosTopic", callback, std_Bool) #Subscribing to uRosTopic  
  1. Create a new Ros msg Class
from uros.core import *
from uros.core import create_message

#creating new msg class
std_Point = create_message(type = "std_msgs/Point", x = int, y = int, z = int)
uRos = Ros("0.0.0.0", 9090)                     #creating new uRos object
msg = std_Point(x = 4, y = 7, z = 0)            #creating a Ros string msg object
uRos.publish("uRosTopic", msg)                  #publishing the msg object 

TODO List

  • Standard Ros Messages
  • Ros Services
  • Service Generator to create various Services

Author

Mohamed Gamal [email protected]

About

Ros implementation for micropython boards

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages