Skip to main content

Using NEEMs database with the help of NEEMQuery python package to redo or replay neems using PyCRAM

Project description

NEEMPyCRAMInterface

A python library for using the SQL NEEMs database (with the help of NEEMQuery) in combination with PyCRAM to be able to replay the NEEM motions or redo the executed plan in the NEEM using the PyCRAM framework.

Installation

pip install neem_pycram_interface

Example Usage

All below examples assume the neems are located in a 'test' database at 'localhost' which can be accessed by 'newuser' using password 'password'.

Replaying the motions of multiple NEEMs:

This is done by using the PyCRAMNEEMInterface class which provides a higher level of abstraction, and uses PyCRAM to replay the motions retrieved from the SQL queries. This shows the replay of three NEEMs in real time.

from neem_pycram_interface.neem_pycram_interface import PyCRAMNEEMInterface

from pycram.datastructures.enums import WorldMode
from pycram.worlds.bullet_world import BulletWorld
from pycram.ros.viz_marker_publisher import VizMarkerPublisher

pni = PyCRAMNEEMInterface('mysql+pymysql://newuser:password@localhost/test')
world = BulletWorld(mode=WorldMode.DIRECT)
vis_mark_publisher = VizMarkerPublisher()

neem_ids = [14, 15, 16]
pni.replay_motion_of_neem(neem_ids, real_time=False)

https://github.com/AbdelrhmanBassiouny/NEEMPyCRAMInterface/assets/36744004/d6179b69-6dc0-43bc-ac18-6fa237542d03

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

neem_pycram_interface-1.0.11.tar.gz (53.2 kB view details)

Uploaded Source

Built Distribution

neem_pycram_interface-1.0.11-py3-none-any.whl (38.9 kB view details)

Uploaded Python 3

File details

Details for the file neem_pycram_interface-1.0.11.tar.gz.

File metadata

File hashes

Hashes for neem_pycram_interface-1.0.11.tar.gz
Algorithm Hash digest
SHA256 610576a82d6caf597bbd0d2b8783fc9a3b71179206b20fde0f0e0d9a40492a48
MD5 736512ba56302e46e153fb38732760e2
BLAKE2b-256 f20251ef7914e35816a524e528879444397224cb5e4c30b9a295a7fbd9187548

See more details on using hashes here.

File details

Details for the file neem_pycram_interface-1.0.11-py3-none-any.whl.

File metadata

File hashes

Hashes for neem_pycram_interface-1.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 8c11c688b023083e74e979bc06200747ed134f8d11b099fd17d025de88967ab7
MD5 6cedb4e74674fc7a62216a5c69a31aee
BLAKE2b-256 db13055bb0cd82c768b1356ddb2f446bac78802d6d28b14d178f2cb1aa086380

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