ROS1

ROS1 package to serve download map in ROS system. The package will use SDK to download map data from MotivEdge server. Then use ROS map_server to serve the map.

Pre-requirements

  • Python >= 3.6

  • An account at Portal Motivedge

  • ROS distributions: Melodic or Noetic.

Installation

mkdir -p catkin_ws/src
cd catkin_ws/src
git clone https://github.com/motivedge/motivedge_ros.git
cd motivedge_ros
pip3 install -r requirements.txt
cd ../..
catkin build motivedge_ros # OR catkin_make
source devel/setup.sh

How to use

  1. Get API token from profile & token page

    export ME_TOKEN=<api_token>
    
  2. Find the target map’s MAP_ID. We could find this ID at map details page of our portal site. It’s next to the map name.

  3. Launch map service client which includes downloading map and map_server map service.

    roslaunch motivedge_ros map_client.launch map_id:=<MAPID>
    

How it works

Currently, there are two nodes running in launch file. map_download.py and map_server.

  • map_download.py node will perform the map downloading and save map files locally.

  • map_server is ROS package. We pass the map yaml file location to it. map_server will perform the robust map service.

Published Topics

  • /metapoints_filepath: std_msgs/String, published from map_download.py.

    It’s the path of metadata yaml file which includs mark points/paths/blocks information. Other nodes could get the path and use motivedge.Client.read_mark_points method to read the data inside. Then, clients could save data into database or directly publish to robot.

    For costmap generated from 3D map, there is no metadata.yaml file. This topic will publish empty string.

  • /map_metadata: nav_msgs/MapMetaData, published from map_server. It includes the map yaml file content. Details please check map_server page, here

  • /map: nav_msgs/OccupancyGrid, published from map_server. It includes the map yaml file content. Details please check map_server page, here

Contributing

We love sharing and welcome sharing and contributing. Please submit pull requests or raise issues in our repo.

License

It’s under Apache License 2.0 License.