Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to integrate the fleet_adapter_template step by step? #11

Open
SuperTunaa opened this issue Jul 7, 2022 · 4 comments
Open

How to integrate the fleet_adapter_template step by step? #11

SuperTunaa opened this issue Jul 7, 2022 · 4 comments

Comments

@SuperTunaa
Copy link

Hi @Yadunund,
I'm trying to integrate my robot using this template but I want more describe about how to use fleet adapter with my robot. What files do I need to create besides fleeter adapter template. Can you explain step by step to me?

Environment:
Ubuntu 20.04 + ROS2 Galactic

Thank you in advance.

@Yadunund
Copy link
Member

Yadunund commented Jul 7, 2022

You'll need run all the other Open-RMF nodes. Take a look at the launch file here. For running with your robot, you can just replace this block with the instructions to run your fleet adapter.

Before that you would need to generate traffic lanes for your specific robot. Take a look at our documentation here to learn how to use rmf_traffic_editor to do so.

@SuperTunaa
Copy link
Author

SuperTunaa commented Jul 8, 2022

For running with your robot, you can just replace this block with the instructions to run your fleet adapter.

Replaced by running this file?

Before that you would need to generate traffic lanes for your specific robot. Take a look at our documentation here to learn how to use rmf_traffic_editor to do so.

I have a 0.yaml file created from ros2 run rmf_building_map_tools building_map_generator nav

Another question @Yadunund

  1. Where can I find reference_coordinates robot in config.yaml.
  2. Before running the fleet_adapter_template do I have to run the server? Because I see in the fleet_adapter_ecobot has sim-server
  3. How does fleet adapter control robot. where can I see the command line?

@calvintanct
Copy link

calvintanct commented Nov 8, 2022

Hello @Yadunund ,
I am currently exploring the fleet adapter, and I realize something, the reference coordinates for config.yaml only related to one RMF map and one robot map.
What should you do if the robot actually run on different map (e.g. the RMF run the robot on 10 different maps)?
How to reference each single map with different reference coordinates to align each different maps on RMF and robot?

@Yadunund
Copy link
Member

@calvintanct apologies for the overdue response.

There are many ways to handle coordinate transforms for multiple maps. The approach in this template is very rudimentay and works best for a single set of transforms. Here are some ideas that come to mind:

  1. Update the reference_coordinate YAML key to store a list of cooresponding coordinates for each level. Then update the fleet_adapter.py script to parse all the levels and generate the transforms for each. You'll then pass a dict of level_name:Transform objects to the RobotCommandHandle which can lookup the right transform depending on which level the robot is on.
reference_coordinates:
  level_1:
    rmf: [[20.33, -3.156],
          [8.908, -2.57],
          [13.02, -3.601],
          [21.93, -4.124]]
    robot: [[59, 399],
          [57, 172],
          [68, 251],
          [75, 429]]
  level_2:
    ...
  1. You could have another ROS 2 node running that provides the transform information for each level. ie, its running a Service server which you can query and get a geometry_msgs::msg::Transform object (or your own msg). This way you can offload the responsibility of computing the transforms to an external node. Maybe on initialization of this adapter, you get all the transforms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants