Giter VIP home page Giter VIP logo

fleet_adapter_ecobot's Introduction

Fleet Adapter Ecobot

This repository contains an RMF fleet adapter developed for Gaussian Ecobot cleaning robots. It has been tested on S40, S50 and S75 variants of robots. The adapter communicates with the robots via REST API calls. For more information on the APIs, please reference this document

Requirements

Setup

  • Clone this repository into a workspace
  • Source Open-RMF
  • colcon build --packages-up-to fleet_adapter_ecobot --cmake-args -DCMAKE_BUILD_TYPE=Release

Run the fleet adapter

Ensure the robot can be pinged.

ros2 run fleet_adapter_ecobot fleet_adapter_ecobot -c CONFIG_FILE -n NAV_GRAPH

To run the fleet adapter with rmf-web, specify the server_uri (-s):

ros2 run fleet_adapter_ecobot fleet_adapter_ecobot -c CONFIG_FILE -n NAV_GRAPH -s ws://localhost:8000/_internal

Test the fleet adapter in "Mock Mode"

The adapter can be tested in mock mode with the help of the TestClientAPI. This class emulates the member functions of EcobotClientAPI.py which calls the rest apis of the robot. This "mock mode" is enabled by providing -tf argument.

Run this example in office world:

ros2 launch rmf_demos office.launch.xml run_fleet_adapters:=0

Then run the ecobot fleet adapter

# Note the addition of "--test_api_config_file" and "-tf"
ros2 run fleet_adapter_ecobot fleet_adapter_ecobot \
    -c src/fleet_adapter_ecobot/configs/robot_config.yaml \
    -n install/rmf_demos_maps/share/rmf_demos_maps/maps/office/nav_graphs/0.yaml \
    -s "ws://localhost:8000/_internal" \
    -tf src/fleet_adapter_ecobot/configs/test_api_config.yaml

Different to the simulation running on gazebo, this TestClientAPI mocks the behavior of the fleet adapter when receives command from RMF. Thus, the script is running on actual system wall time.

Patrol Task

Now try to command robot to move to Pantry

ros2 run rmf_demos_tasks dispatch_patrol -p pantry

Custom Clean Task

Send the robot to clean an area. This custom clean task is created by composing go_to_place and custom perform_action.

ros2 run rmf_demos_tasks dispatch_action -s patrol_D2 -a clean -ad '{ "clean_task_name": "clean_hallway" }'

Show overlayed ecobot map

Show overlayed lidar map on rviz2 office map

ros2 launch rmf_demos map_server.launch.py map_name:=ecobot_office tx:=1.33 ty:=0.057 yaw:=-1.598

Docking to Charger

Add a dock_name on a charger waypoint in traffic editor. This will then call the dock() function when the robot is approaching the charger. Note that this is not demonstrated in this demo.

Get the Ecobot to RMF map Transformation with traffic-editor

To get the transformation of the robot map to rmf map, user can add a "floorplan" of a robot map. Then annotate and the corresponding "constraint-pairs", lastly ctrl-T to let traffic-editor calculate the respective transformation.

Specify this transformation to the rmf_transform in the config.yaml file. Note that the value of Y-axis is applied with a -ve.

Then if you wish to configure your custom waypoints in the configs/test_api_config.yaml, you can use rviz to obtain those points in ecobot coordinates. Run this on a separate terminal.

# first run the office map
ros2 launch rmf_demos office.launch.xml run_fleet_adapters:=0
# then run this on a seperate terminal
ros2 run fleet_adapter_ecobot clicked_point_transform -tf 1.33 0.057 -1.598 0.049

Subsequently, select "publish point" on rviz, then click on the respective point on the map. Immediately, the point in rmf and robot coordinate will get printed on clicked_point_transform terminal. These coordinates are helpful during debugging.

fleet_adapter_ecobot's People

Contributors

yadunund avatar youliangtan avatar luca-della-vedova avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.