airbotics
The ROS package for Airbotics:
-
Developed for ROS 1 and Python 3.8.
-
The package has not been officially released on ROS yet so manual installation is still required.
-
The package contains a single node called
airbotics
that either: 1) subscribes to a map topic on the robot and sends it to the cloud to be saved, or 2) loads a map from the cloud and serves it to rest of the robot over a topic.
To install
mkdir -p catkin_ws/src
cd catkin_ws/src
git clone https://github.com/Airbotics/airbotics
cd airbotics
pip3 install -r requirements.txt
cd ../..
catkin_make
source devel/setup.sh
To run
Firstly, you must set your API Key as an environment variable so the client can authenticate with the backend. Your API key can be generated by using the web console, API, CLI or SDKs.
export AIR_API_KEY=<insert-api-key-here>
The Airbotics node must be started using the launch file and can be run in two modes: save or serve. You must provide a map_slug
as a parameter to the launch file.
Send a map from the robot to the cloud
The map must exist in your account before you run this command.
roslaunch airbotics save.launch map_slug:=<some-map-slug>
Load a map from the cloud and serve it to the robot
The map must exist in your account and have at least one version before you run this command.
roslaunch airbotics serve.launch map_slug:=<some-map-slug>
Parameters
You may provide other optional parameters to the launch file:
Name | ROS Parameter | Type | Default | Description |
---|---|---|---|---|
map_version |
/air/map_version |
str |
latest |
Which map version to load from the cloud. Must be a postive int or 'latest'. Only used when serving. |
map_topic |
/air/map_topic |
str |
/map |
Name of the topic to which maps are published. |
map_metadata_topic |
/air/map_metadata_topic |
str |
/map_metadata |
Name of the topic to which map metadata is published. |
map_throttling |
/air/map_throttling |
int |
5 | Whether to throttle sending updates. Will send every x map updates received. Set to 0 to send every update. |
map_origin |
/air/map_origin |
[float] |
[0.0, 0.0, 0.0] |
The 2-D pose of the lower-left pixel in the map, as (x, y, yaw). Only used when serving. |
map_resolution |
/air/map_resolution |
float |
0.1 | Resolution of the map. Only used when serving. |
map_frame_id |
/air/map_frame_id |
str |
map |
Frame of the map. Only used when serving. |
Example of running the Airbotics node in save mode with all relevant parameters:
roslaunch airbotics serve.launch map_slug:=<some-map-slug> \
map_topic:=/robot/map \
map_metadata_topic:=/robot/map_metadata \
map_throttling:=5
Example of running the Airbotics node in serve mode with all relevant parameters:
roslaunch airbotics serve.launch map_slug:=<some-map-slug> \
map_version:=42 \
map_topic:=/robot/map \
map_metadata_topic:=/robot/map_metadata \
map_origin:=[10.0,10.0,0.0] \
map_resolution:=0.05 \
map_frame_id:=map
Contributing
We love contributions! Please see our Contributing guide for more information.
License
The software in this repository is licensed under the Apache 2.0 License. Copyright 2021 Airbotics.