Skip to main content

rosmobilelib

Project description

rosmobilelib

Enable to struct movement robotic action with ROS, the open-source robotic middleware. This library make able to run that by Python3 code on external of ROS network and workspace.

This is depended roslibpy that allows ROS programing without defining as ROS Node by using rospy.

Main Features

  • Manage features to set ROS robotic movement simply.
  • Dynamic schedule to Goal with sending/waiting of Action.
  • Provide some feature that use for programming with ROS such as coordinate transformation of TF.
  • Give support to synchronize to single callback for needs to subscribed multi topic such as stereo camera system.

Installation

To install rosmobilelib, use pip:

pip install rosmobilelib

or

pip install rosmobilelib --extra-index-url https://test.pypi.org/simple

Documentation

Details coming soon. For now, just watch down and get through it.

Example implementation:

Import libraries.

import roslibpy as rlp
from rosmobilelib import MobileClient

Prepare connection with roslibpy. If you desire details see here.

client = rlp.Ros('localhost', port=9090)
lm1 = lambda: print('is ROS connected: ', client.is_connected)
client.on_ready(lm1)
client.run()

Define MobileClient object and wait for to subscribe needs topics.

lm2 = lambda r: print('reached goal', r)
ms = MobileClient(client, lm2, odom_topic='/odom', map_topic='/map')
ms.wait_for_ready()

Use dynamic FCFS scheduler. Set goal and make able to execute goals. You can set goal any time not only after call start().

Details:

  • start(), stop(): make scheduling queue executable/inexecutable
ms.start()

# set scheduler a goal that go ahead 0.5 from robot body
ms.set_goal_relative_xy(0.5, 0, is_dynamic=False)

# set relative pos(x:front:-0.5, y:left:1) based basis vector that decided dynamic after previous executed
ms.set_goal_relative_xy(-0.5, 1, is_dynamic=True)

# set goal directly with world frame's pose
ms.set_goal(ms.get_vec_q(-0.4,-0.6,0), ms.get_rot_q(0,0,math.pi/2))

time.sleep(60)

ms.stop()

There are other way to wait for time until reach goal. Exchange time.sleep(n) to ms.wait_for_execute_all().

...
ms.wait_for_execute_all()
...

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rosmobilelib-0.1.2.6.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

rosmobilelib-0.1.2.6-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file rosmobilelib-0.1.2.6.tar.gz.

File metadata

  • Download URL: rosmobilelib-0.1.2.6.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.10 CPython/3.8.3 Darwin/19.6.0

File hashes

Hashes for rosmobilelib-0.1.2.6.tar.gz
Algorithm Hash digest
SHA256 7a20bb07d54adfac157f73aed91be53e8b0a7a2838b75de5678d77bfec34d6c5
MD5 0b182c4948209895ca2cbe8b5e059c21
BLAKE2b-256 8e2721689b7027f49715a15694225cb70234eaae5cb8b165243f23cb65cfa1c4

See more details on using hashes here.

File details

Details for the file rosmobilelib-0.1.2.6-py3-none-any.whl.

File metadata

  • Download URL: rosmobilelib-0.1.2.6-py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.10 CPython/3.8.3 Darwin/19.6.0

File hashes

Hashes for rosmobilelib-0.1.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 0a31c7f9e158416184eb034cd4debefc5d4a8a6d9fc362a442e987dca6053d5a
MD5 518bbb3052527b45a53e882049cf62b8
BLAKE2b-256 0eb20e4397a9d889efaf6a6f15af05ab5cc44bf00b4bf383c6e15f8ab695157a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page