Robot integration runtime for the ARENA
Project description
ARENA-robot
Robot integration runtime for the ARENA.
Installation
Requires Python3.8+ (it probably runs fine on 3.6 and 3.7, but you will need your own NumPy wheels)
From PyPi:
pip install arena-robot
Latest development:
pip install git+https://github.com/arenaxr/arena-robot#egg=arena-robot
Or for development, clone the repo and from inside the directory:
pip install -e .
Modules
arenarobot
Services that stream to MQTT may be started with the arena-robot-service
command. See examples/service_sensor_vl53l5cx_lidar_1.json
for a service file example. All services require the following arguments:
service_type
: Required. Currently onlysensor_vl53l5cx
is supported.instance_name
: Required. The name of this running service.subtopic
: Required. The device subtopic to publish to. For sensors, this will always be prefixed withsensors/
. For processors, this will always be prefixed withprocessors/
.interval_ms
For services that run repeatedly, this is the interval. Set to -1 by default, which will fire the service once. Set to 0 to fire as fast as possible. This option is ignored for async-based services.
A service can be run with the arenaxr.org
instance of ARENA with:
MQTTH=mqtt.arenaxr.org DEVICE=mydevicename arena-robot-service my_service.json
A complete set of example services may be found in the examples
directory.
sensor_beluga_serial
This is a Beluga UWB sensor connected via serial:
dev_path
: Required. Path to the serial dev file device. For example, a Beluga USB serial device commonly shows up on Linux as/dev/ttyACM[0-9]+
. Hardware serial ports are often/dev/ttyS[0-9]+
. For USB devices, it is best practice to use the full serial device symlink like/dev/serial/by-id/usb-SEGGER_J-Link_000760025484-if00
so that the connection order does not affect the device assignment. If multiple USB devices of the same type are connected, then the/dev/serial/by-path/.*
syminks should be used to select the serial device by USB port.beluga_id
: Required. ID to assign to Beluga.baudrate
: Optional. Defaults to 115200.beluga_rate
: Optional. Defaults to 10. Rate in ms that Beluga will query and respond.beluga_channel
: Optional. Defaults to unset. See Beluga documentation.beluga_tx_power
: Optional. Defaults to unset. See Beluga documentation.beluga_timeout
: Optional. Defaults to unset. See Beluga documentation.beluga_twr_mode
: Optional. Defaults to unset. See Beluga documentation.beluga_led_mode
: Optional. Defaults to unset. See Beluga documentation.
sensor_licosa_serial
This is a LiCosa IMU and lidar sensor connected via serial:
dev_path
: Required. Path to the serial dev file device. For example, a LiCosa USB serial device commonly shows up on Linux as/dev/ttyACM[0-9]+
. Hardware serial ports are often/dev/ttyS[0-9]+
. For USB devices, it is best practice to use the full serial device symlink like/dev/serial/by-id/usb-Raspberry_Pi_Pico_E4616C840F602C27-if00
so that the connection order does not affect the device assignment. If multiple USB devices of the same type are connected, then the/dev/serial/by-path/.*
syminks should be used to select the serial device by USB port.baudrate
: Optional. Defaults to 230400.
sensor_t265
This is an Intel T265:
timeout_ms
: Optional. Defaults to 500. Timeout in milliseconds for waiting for pose frames from the sensor.enable_pose_jumping
: Optional. Defaults to False. Enable position jumping. See librealsense docs.enable_relocalization
: Optional. Defaults to False. Enable appearance based relocalization. See librealsense docs.enable_mapping
: Optional. Defaults to False. Enable an internal map. See librealsense docs.enable_map_preservation
: Optional. Defaults to False. Preserve map from the previous run.enable_dynamic_calibration
: Optional. Defaults to True. Enable dynamic calibration.
processor_t265
This is an Intel T265 transformation processor. This service runs initially to set up callback listeners, so the interval_ms
should always be -1
. The available options are:
sensor_t265_topic
: Required. Full path to the topic with the T265 data. Note that the processor will ignore sensor messages that are not from asensor_t265
instance.sensor_t265_instance_name
: Optional. Defaults to None. Name of the T265 instance to process messages from. This is useful if multiple T265 instances are publishing to a topic and you would like to ignore all but one of them.camera_orientation
: Optional. Defaults to 0. The orientation options are:0
: Forward, USB port to the right1
: Downfacing, USB port to the right2
: 45 degree forward3
: Upward facing, USB port to the right
scale_factor
: Optional. Defaults to 1. Scale factor to apply to body transformations.jump_threshold_translation
: Optional. Defaults to 0.1. Position jump detection threshold in meters. This value should be relative to how frequent is the position data is obtained (200Hz for the T265).jump_threshold_velocity
: Optional. Defaults to 20. Velocity jump detection threshold in meters/second. This value should be relative to how frequent is the velocity data is obtained (200Hz for the T265).
sensor_vl53l5cx
This is a lidar sensor that connects through I2C and addresses by toggling its LPn pins. It additionally supports the following arguments:
dev_path
: Required. Path to the I2C dev file device. For example, the first I2C port on the Raspberry Pi is/dev/i2c-1
.gpio_path
: Required. Path to the GPIO dev file device. For example, the first I2C port on the Raspberry Pi is/dev/gpiochip0
.rst_pin
: Required. Pin (integer) ongpio_path
connected to theI2C_RST
pin on all of the sensors.lpn_pins
: Required. Array of pins (integers) ongpio_path
connected toLpn
pins on each sensor. The array must be present, and at least one pin must be specified or the service won't initialized any sensors. Sensors will be initialized and addressed in te order if this array.
processor_apriltag_detector
This processor reads frames, detects Apriltags, and returns camera pose given a known set of Apriltag locations. All services require the following arguments:
video_file
: Required. Where frames should be read from. e.g./dev/video0
(v4l) orhttp://localhost:8265/cam1
(mjpeg)camera_resolution
: Required. 2-element list. [horizontal resolution, vertical resolution]camera_params
: Required. Camera parameters fx, fy, cx, cydist_params
: Required. Distortion parameters k1, k2, p1, p2, k3apriltag_locations
: Required. Dictionary with Apriltag IDs as keys and 2D-list tag poses as values. The 2D-list should be a 4x4 matrix. The uppermost left 3x3 matrix should represent the rotation matrix of the Apriltag. The rightmost column, from top to bottom, contains the x, y, and z coordinates of the Apriltag's translation. The bottom row should be [0, 0, 0, 1] to allow for transformation-related matrix operations.
The following parameters are for the Python bindings for the Apriltags library:
apriltag_family
: Optional. Defaults to 'tag36h11'. See above documentation.tag_size
: Optional. Defaults to 0.15. See above documentation.num_detector_threads
: Optional. Defaults to 1. See above documentation.quad_decimate
: Optional. Defaults to 2.0. See above documentation.quad_sigma
: Optional. Defaults to 0.0. See above documentation.refine_edges
: Optional. Defaults to 1. See above documentation.decode_sharpening
: Optional. Defaults to 0.25. See above documentation.
arenavideocall
After installing the repo, you should now have the arena-video-call-chrome
command. You can also run it with python3 -m arena-video-call-chrome
. It uses the standard arena-py scene environment variables.
The first argument sets the surface that the video should be mapped to. For example, to map to an object called avideobox
:
MQTTH=mqtt.arenaxr.org NAMESPACE=namespace SCENE=scene arena-video-call-chrome avideobox
licosa_py
The licosa_py
module depends only on NumPy. It includes a packet parser but not the serial interface; you will need to provide this yourself. See examples/licosa_py_basic.py
for an example.
vl53l5cx_py
The vl53l5cx_py
module requires Linux I2C interface (linux/i2c.h
and linux/i2c-dev.h
). It will issue a RuntimeError
on other platforms if it is attempted to initialize.
C shared library
gcc -fPIC -shared -o vl53l5cx.so -Ivl53l5cx_py/include -Ivl53l5cx_py/VL53L5CX_Linux_driver_1.1.2/user/platform -Ivl53l5cx_py/VL53L5CX_Linux_driver_1.1.2/user/uld-driver/inc vl53l5cx_py/src/*.c vl53l5cx_py/VL53L5CX_Linux_driver_1.1.2/user/platform/*.c vl53l5cx_py/VL53L5CX_Linux_driver_1.1.2/user/uld-driver/src/*.c -l
License
Copyright (c) 2021, The CONIX Research Center All rights reserved.
This source code is licensed under the BSD-3-Clause license found in the LICENSE file in the root directory of this source tree.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for arena_robot-2.1.0-pp38-pypy38_pp73-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 638f93a76ee68bd5bb85dc989326d42b9abe9dc2672cf2751d488c2073f2f92c |
|
MD5 | e378ba2574f73b886fbfdf55b4f767b0 |
|
BLAKE2b-256 | 5648ed7513e3832bf622b9c4181f1ba363ebd2bc6b28ab6cb84218d08ea959ed |
Hashes for arena_robot-2.1.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1d45e7d2546ce6d8abc8a6da441bdb93478b7a1320edb776475017cdd2b7806 |
|
MD5 | 39730e2f44c81e374130b4a6439f4be0 |
|
BLAKE2b-256 | 651a3016686cfc890c4be8085440ad7bea9390a8bb94e3fefdd0a7ce6658cce3 |
Hashes for arena_robot-2.1.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cdb3fdd6deaafe2ec3641991e8d179473933afc885b1c57adcf50e2eb35f5942 |
|
MD5 | 5974d0677a26fa246deba2f85bd6ef7f |
|
BLAKE2b-256 | f1ed4168881e3ad03c4e6277f9453fb99a2f87a898dbec592cedb46556700690 |
Hashes for arena_robot-2.1.0-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8946ad46942a1da1e6adc968b3ade8dbdbec122222a972722c760c4e53787163 |
|
MD5 | dd751419c8ec3c6be84717caf3af9a6f |
|
BLAKE2b-256 | 0190adf732a8fa8f0e146fdacc0c209abeca43a031e2f65bf220d348936d94cb |
Hashes for arena_robot-2.1.0-cp310-cp310-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44ec815e87565188009914fc9e4e0c5a0abf2aeb6c4629526b7b1d94cd7d37d6 |
|
MD5 | e0300fe0a96e1f3cfbda0772928204a3 |
|
BLAKE2b-256 | 6ae8bf62bbc9504f2a61e178bb5686acf270c75662e488dbc2b8759e9a6f95fd |
Hashes for arena_robot-2.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 058207f5be924461211b156613848da7d8247b381ff074545616776c941c8443 |
|
MD5 | 53f80157c521609fbe35d720870af8e7 |
|
BLAKE2b-256 | 8828cf64bb2d27eb7a9a884be278db1c03ccd0fcca36090a408370937b89b6bf |
Hashes for arena_robot-2.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 247ad40d179ce641e6907fc38d2e624e946a98489e335fc565669f9246b9b193 |
|
MD5 | 0b1dbd3155d96ecb0f8f157644abac63 |
|
BLAKE2b-256 | e62c0258f214c49aff973519c0fea4ca302957c1ec203afa7cbb66acc27d77a8 |
Hashes for arena_robot-2.1.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29879b38bb286855601321d7e64a144fc17be2b1709e762d5bcd3df274d6d251 |
|
MD5 | e5b1bcfdc94ab3eeac5c6b666dbc0de7 |
|
BLAKE2b-256 | 906580a32707851f6aae9d342983d61a91215019af874c08a91ee41f338c8b7d |
Hashes for arena_robot-2.1.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06b526fa74e260368b771df8d005c54ed66ede5220fce5a884590a718c694387 |
|
MD5 | ad9c9d2ccbb59067112b1e42ed169ea4 |
|
BLAKE2b-256 | 65b006e5e67e292784eb8c8825cb8bad432583c90856da06fbd578e0c39a460d |
Hashes for arena_robot-2.1.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d7c0d9a3cc1608ca0341c4a64a3ba94eda8570aaac86cef13b46e97dc9e44df2 |
|
MD5 | 3f7146928c04cd11b11c5f849362b321 |
|
BLAKE2b-256 | abae2974de354915977a7cda1d3c39d407f57ca0fe70ecb1e6849658afeebc69 |
Hashes for arena_robot-2.1.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eaabc5756d274526e0f43977230fec1808393e17dc58fb5d4db86f9b741e7172 |
|
MD5 | 4773eaa09a98dba1efc1662ed011f7f8 |
|
BLAKE2b-256 | c962404f0e985860a4c09f9d60448a72bd601e074b82b6cc89feae808f80334d |
Hashes for arena_robot-2.1.0-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e85c05aa4a4eae78b28760310c52d38f02b150ea52dca926ccb3e832ab604c35 |
|
MD5 | dd91de37a8ec1750cda665aeabccfe2c |
|
BLAKE2b-256 | 08584ff864eb911fe769bb58f9a092002567b12de682252026fed53bcbebc578 |
Hashes for arena_robot-2.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42f69a40c5439fc53e3ba2dd6fbb388dd0f28cc8052ea53282441320320a2dcc |
|
MD5 | b25150c25fa298ef4a10f63f9964ce18 |
|
BLAKE2b-256 | 1bd9b9f7603ef4d1d39957e7d27e3cc74bdd220aeb09168e3cb38c727bf773fe |
Hashes for arena_robot-2.1.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96babc5be47d84a76079747e8648ef1a6acf7f8194568cb466b52930b8830ac9 |
|
MD5 | 1c01ce950d82a865d99c47f8a4c0480c |
|
BLAKE2b-256 | 65465998383cbf957b033efb187e19fbdbe0f1e5c77b764703b237a3e7e246d2 |
Hashes for arena_robot-2.1.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c822f4717dd7608052018cc317607ae7443d5f09abd364b9493b030dd4b8d21e |
|
MD5 | bdb358948a7105655fcf3845701b7f71 |
|
BLAKE2b-256 | 30399d81eab2e87f236d8d9219aad294ac31df4ff6e7c5bd5b4263d73310ef10 |
Hashes for arena_robot-2.1.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 318608d3a4a0d60f397de366a87fa8254059666d322d0778fa6d9eea1eda5c36 |
|
MD5 | bac7502a52789a733b054efd31951ff9 |
|
BLAKE2b-256 | f2e234a85fe7fe2cb14faf183c75194774d1f571b0a0640237e5f22f3a08382d |
Hashes for arena_robot-2.1.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ea62196115a35895cbd78d6c002bbefddc508888b5ba098ba396b39e892b137 |
|
MD5 | 1a0e0be291af94c1a9ce49e58fef1500 |
|
BLAKE2b-256 | 65636668bdec36e6c334311f47dc5e0750740fae1774f13449af91d6050ef0dc |
Hashes for arena_robot-2.1.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a4af5366d8dfa9d520835744b9931478139d1472ea7687320fd3b3f526ded65 |
|
MD5 | 29d822a3de2b81c6bc98d5345c5ce6da |
|
BLAKE2b-256 | 67c8134d8854f72fcb20748c9197e43507747d3e59f85f89adcc4f70f2f4886e |
Hashes for arena_robot-2.1.0-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29e172d09c838d0ba8cfdcdc7825b858944e9700c021e4e5f3de0d86df7b6d73 |
|
MD5 | 8c0e17cbe2c2b27cd6db5e8e5f5fe845 |
|
BLAKE2b-256 | 5b6af499b9421e1623727e1a5918af9effeecce9072c1d147cb1d40d268fc267 |
Hashes for arena_robot-2.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e131eff61b19fc7929e2ca0e9aedcf35cec133485bd10cb32ad06707f9db2eb8 |
|
MD5 | f3a1121aea87bdfb063f73d0daacc396 |
|
BLAKE2b-256 | 76df69c7bcd8b41b2bb4ae609e621c79ce7b45a3c8c0adc82cec11b1958c9076 |
Hashes for arena_robot-2.1.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 776ccfd8ae5a0a97ca93b1ab7cc5152b4dcf499b4f9998ac00037c2c638e27ca |
|
MD5 | dd08f1dba276003b4e508e16b4da8b76 |
|
BLAKE2b-256 | a3ead9cdeaf1bef7572cf42294c1b143bf1073ef8bb3a27ffadc65128f4cd2e1 |
Hashes for arena_robot-2.1.0-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47b85803a8cfbaddd6cf0f06d731e3c0e19059bdb7cb7bb163c1e446e0b26c9d |
|
MD5 | a16a3b0938eaee7ec78349b32342951e |
|
BLAKE2b-256 | b0274bf0b638bda5931fbd170a916e3b332efa6ad31a2143928885cee0d2e790 |
Hashes for arena_robot-2.1.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d18d9626393741964cada8fe83daca88200c5167c25dc2cfa1fcc80d905ba65 |
|
MD5 | aef7c7c92cb8e9388bbbfcdeb3b5455e |
|
BLAKE2b-256 | 67bb8ad50a86474ea06c7b3b4c7dd9b741059d957ede63f50529c6c5da7a8071 |
Hashes for arena_robot-2.1.0-cp38-cp38-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e271ca44299861bfbbcfd1803944a31bd944566af32d4fa9cb46d104132552a |
|
MD5 | 7b1bd87ef097c3f48f9b290d774b9ddf |
|
BLAKE2b-256 | 40abb5690601615d0c26b8d4e98e7d1c81407a4fafc6bed2d7dabec352da7f53 |