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

help: integrate the fleet_adapter_template to RMF and simulation #4

Closed
sharensmile opened this issue Dec 8, 2021 · 8 comments
Closed

Comments

@sharensmile
Copy link

Hi Yado:
after reading the source code, I found a node named "robot_command_handle" will setup and run.
node

it is the node in the RMF_Demo project?
But I can't found any node named "robot_command_handle" in the RMF_Demo project.

another question:
the senario and step

  1. run the office.launch.xml
  2. run the fleet _adapter_template
    but the delivery robot didn't run as I command. it seemed the navigation point didn't work.

Is there any demo instruction to run this fleet_adapter_template?
so that I can follow it and run the simulation.

Thank you in advance.

@Yadunund
Copy link
Member

Yadunund commented Dec 9, 2021

Hi @sharensmile

The robot_command_handle node is initialized within this package.

This package is meant to be a reference for users who would like to write a fleet adapter to communicate with their own robots. The expectation of running this adapter out of the box to control the robots in rmf_demos is incorrect.
Having said that, you can modify this adapter such that the RobotClientAPI publishes fleet_state_msgs to the robots in simulation which are commanded by the slotcar plugin.

Related to this, we are currently updating the simulations in rmf_demos to use a fleet adapter that is based on this template to control the various robots. This PR open-rmf/rmf_demos#109 has more details. You can look at the launch files there to see how to test your fleet adapter with robots in simulation.

@edcogue
Copy link

edcogue commented Dec 20, 2021

Hi Yado,

I'm trying to connect a custom robot simulation with rmf_core using a custom fleet adapter. I was working with this template and seems all okay. When I lunch the adapter, the robot moves to the spawn_point in defined in the nav_graph but if I try to send new task with a custom panel (using a custom dashboard_config_file) the adapter finishes without showing any message or error... How can I get some information about this problem?

@edcogue
Copy link

edcogue commented Dec 22, 2021

In addition, when I see logs comming from rmf_core dispatcher node, the bid proposal result is "task has no submissions during bidding, Task Failed". Also when I order a task the adapter stops working. I have configured the config yaml with loop and delivery.

Edit: topic /rmf_task/bid_notice is showing the order but no message is send on /rmf_task/bid_proposal

@edcogue
Copy link

edcogue commented Dec 23, 2021

Finally I was able to find the problem. Two nodes of nav_graph were not join. It will be great if in the future the adapter raises any message about this error.

@Yadunund
Copy link
Member

Yadunund commented Jan 4, 2022

Hi @edcogue

Apologies for the overdue response. I was away over the holidays.

Glad to hear that you found a solution to the error you were experiencing. The C++ fleet adapter does throw an error when there is a discontinuity in the navigation graph. Perhaps this information gets masked by the python bindings. I've opened a separate ticket to track this since it is different from the one originally posted here. See #6

@sharensmile
Copy link
Author

Hi @sharensmile

The robot_command_handle node is initialized within this package.

This package is meant to be a reference for users who would like to write a fleet adapter to communicate with their own robots. The expectation of running this adapter out of the box to control the robots in rmf_demos is incorrect. Having said that, you can modify this adapter such that the RobotClientAPI publishes fleet_state_msgs to the robots in simulation which are commanded by the slotcar plugin.

Related to this, we are currently updating the simulations in rmf_demos to use a fleet adapter that is based on this template to control the various robots. This PR open-rmf/rmf_demos#109 has more details. You can look at the launch files there to see how to test your fleet adapter with robots in simulation.

Hi @Yadunund
Thank you very much!
base on your instruction, I integrated our real robot with our map to the rmf. it can do the loop. the robot can be loop in the Rviz. but the robot in the Gazebo standstill.
when run the demo tinybot, the Gazebo tinybot and Rviz tinybot can synchorinze well.
but why the Rviz bot can synchornize the real bot in the real world. but Gazebo standstill?
how can I synchornize the real bot in the real world with the simulated bot in Rviz and Gazebo? I think there should be some setting in Gazebo can received the poistion information from the real world.
Thank you again!

@Yadunund
Copy link
Member

Hi @sharensmile

Really glad to hear that you were able to command your real robots with your adapter.

I would like to clarify the intended use of gazebo/ignition for RMF. These simulators are a replacement for the physical world to receive states of virtual robots and infrastructure as they react to commands issued by RMF. You should not be running a gazebo simulation and commanding real robots at the same time as you may receive duplicate states of the various systems.

But if your intention is to showcase some sort of a "digital twin" of the real world, you can do so by writing gazebo model/world plugins that will update the pose of robots in gazebo based on state updates published by your real robot/fleet adapter. These would then replace the plugins that are currently launched with the RMF demo worlds. If you're interested in working on this, you can contribute to https://github.com/open-rmf/rmf_simulation.

@Yadunund
Copy link
Member

Yadunund commented Mar 7, 2022

Closing due to inactivity. Feel free to open again if required.

@Yadunund Yadunund closed this as completed Mar 7, 2022
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