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

Question about free-fleet, Is it possible to bind a robot without nav2 pkg to a robot with nav2 pkg? #139

Open
1 task done
eeoon opened this issue Aug 6, 2023 · 7 comments

Comments

@eeoon
Copy link

eeoon commented Aug 6, 2023

Before proceeding, is there an existing issue or discussion for this?

Description

I try two robot, tinyRobot and turtlebot3_burger in free-fleett. so i make tinyRobot.urdf, map etc.. umm. i have question about that. this is server error? but the comment does not look like server error. how can i do it!?

[free_fleet_client_ros2-11] [ERROR] [1691337344.234318697] [transformPoseInTargetFrame]: Extrapolation Error looking up target frame: Lookup would require extrapolation into the past. Requested time 758.837000 but the earliest data is at time 1691337334.253269, when looking up transform from frame [tinyRobot_base_footprint] to frame [map]
[free_fleet_client_ros2-11]
[free_fleet_client_ros2-11] [WARN] [1691337344.234345710] [tinyRobot_A_free_fleet_client_node]: Unable to get robot pose.

I want to test the other robot (turtlebot3_burger & tinyRobot). so i try to free-fleet and build up tinyRobot & turtlebot3_burger. and so i command the task. turtlebot3 is moving to waypoint with nav2. but tinyRobot isn't moving. I want to move just move about tinyRobot.(without nav2). so how do i that..? i know the control_type(full_control, readonly). i check the full_control(slotcar.so) in tinyRobot's sdf file.

help me.. please..

terminal 1 :
ros2 launch ff_examples_ros2 turtlebot3_square_ff.launch.xml
terminal 2 :
ros2 launch rmf_demos square.launch.xml
terminal 3 :
ros2 launch ff_examples_ros2 turtlebot3_square_ff_server.launch.xml

teminal 4 :
ros2 run rmf_demos_task dispatch-patrol -p n3 --use_sim_time (for tb3_burger)
ros2 run rmf_demos_task dispatch-patrol -p n8--use_sim_time (for tinyRobot)

image

@aaronchongth
Copy link
Member

Hello @kyu8456! tinyRobot does not use nav2 and operates purely using the slotcar plugin. It looks like what you need now, is to start an additional fleet adapter just for tinyRobot. This will be similar to a real deployment where each different fleet of robots should have its own fleet adapter running, with different navigation graphs. (You can make an identical navigation graph for the tinyRobot fleet, or a different one to see how open-rmf helps each fleet avoid each other!)

You can use https://github.com/open-rmf/rmf_demos/blob/main/rmf_demos/launch/office.launch.xml#L14-L21 as a starting point.

@eeoon
Copy link
Author

eeoon commented Aug 7, 2023

Thanks your reply.
I knwo that tinyRobot does not use nav2. so i want to just move waypoint without nav2 like : ros2 launch rmf_demos_gz_classic. rmf_gz_classic on the rviz & gazebo that is just move on the map though rmf_task. so i want to turtlebot3 move with nav2 pkg, tinyrobot move without nav2 at the same time.
and the two robot share the nav_graph (0.yaml). oh! i question about your reply, the nav_graph isn't share different robot?

I use the rmf_adapter like this

rmf_demos launch square.launch.xml
skip the common launch.

 TinyRobot fleet adapter
  <group>
    <include file="$(find-pkg-share rmf_demos_fleet_adapter)/launch/fleet_adapter.launch.xml">
      <arg name="use_sim_time" value="$(var use_sim_time)"/>
      <arg name="nav_graph_file" value="$(find-pkg-share rmf_demos_maps)/maps/square/nav_graphs/0.yaml" />
      <arg name="config_file" value="$(find-pkg-share rmf_demos)/config/square/tinyRobot_config.yaml"/>
    </include>
  </group>
  
 Turtlebot3_burger fleet adapter
  <group>
    <let name="fleet_name" value="tb3"/>
    <let name="robot_name" value="tb3_A"/> 
    <include file="$(find-pkg-share rmf_demos)/include/adapters/turtlebot3_adapter.launch.xml">      
      <arg name="use_sim_time" value="$(var use_sim_time)"/>
      <arg name="nav_graph_file" value="$(find-pkg-share rmf_demos_maps)/maps/square/nav_graphs/0.yaml" />
      <arg name="config_file" value="$(find-pkg-share rmf_demos)/config/square/turtlebot3_burger_config.yaml"/>
    </include>   
    <include file="$(find-pkg-share rmf_fleet_adapter)/robot_state_aggregator.launch.xml">
      <arg name="robot_prefix" value="$(var fleet_name)"/>
      <arg name="fleet_name" value="$(var fleet_name)"/>
      <arg name="use_sim_time" value="$(var use_sim_time)"/>
      <arg name="failover_mode" value="$(var failover_mode)"/>
    </include>
  </group> 

@aaronchongth
Copy link
Member

Sorry I misunderstood your question earlier.

i want to just move waypoint without nav2 like : ros2 launch rmf_demos_gz_classic. rmf_gz_classic on the rviz & gazebo that is just move on the map though rmf_task. so i want to turtlebot3 move with nav2 pkg, tinyrobot move without nav2 at the same time.

This is possible, but highly discouraged, as decisions or commands to the robots directly without through open-rmf, will cause unforeseen disruptions to the scheduling system, as open-rmf uses all the information provided by the fleet adapters to resolve conflicts, allocate tasks and allow sharing of resources (doors, lifts, infrastructure, etc). For example, if user A requests that the turtlebot3 go to waypoint 1 using nav2 (not open-rmf), and user B requests tinyrobot to head to waypoint 1 through open-rmf, at the same time, open-rmf will not know that there will be a traffic conflict ahead of time, and there will be a significant chance that both robots will enter a deadlock on the way to waypoint 1.

The best way to operate both robots from different fleets would be using the dispatch-patrol as you already have.

the nav_graph isn't share different robot?

The nav graph can certainly be shared between different fleet of robots, if both fleets really do share the same navigation graph. More often, their navigation graphs are different as they may be of different sizes or if a fleet is not allowed to enter certain areas of the map, whereas the other is allowed to.

@eeoon
Copy link
Author

eeoon commented Aug 7, 2023

Thank you! so much!!
your comment is open_rmf will not know about traffic. yeah.. umm.. i don't understand it.
I try the free-fleet-client and rmf_core and free-fleet-server that open_rmf. As far as I understand free-fleet. this is connection between robot's state and rmf_core.
so any_robot is build up to rmf_core with free-fleet(client & server) like example's turtlebot3.
I try the any_robot that is not use nav2 pkg. just move using robot's odom. umm.. so I make the tinyRobot.urdf file, but maybe the file is not correct. i change other robot like picture and then the robot's state is on rmf_core. the robot spawn on "center" node. but I check the robot's state on rmf_core that using teleop_keyboard __ns:=/tinyRobot. so the robot is near on "n6".

but that isn't also work rmf_task command that the tinyRobot_A move the "n8" using the dispatch-patrol
$ ros2 run rmf_demos_task dispatch_patrol -p n8 --use_sim_time
And turtlebot3 is moving task command like this.
$ ros2 run rmf_demos_task dispatch_patrol -p n3 --use_sim_time

As I understand it, if I enter a destination as a node near that robot, I know that the nearby robot moves. so the command is right.

As a result, the TinyRobot's state is build time_stamp on rmf_core but that isn't move to rmf_task. so why? what can i change the file?

Screenshot from 2023-08-07 15-05-46

@eeoon
Copy link
Author

eeoon commented Aug 8, 2023

heelo. @aaronchongth I understand about free-fleet server yesterday. so the client is two(tb3, tinyRobot) and server is one right? i make the tinyRobot and tb3 are build on rmf_core(nav_graph)
and i have some question about free-fleet client's parameter like nav_server_name so i need your help this time. please
<param name="nav2_server_name" value="/navigate_to_pose"/>
I want to tinyRobot moving just follow path line. so i don't need navigate_to_pose. and i try to change the value="/navigate_to_pose" ----> value="/follow_path"

i quote about nav2_pkg website.
https://navigation.ros.org/configuration/packages/bt-plugins/actions/FollowPath.html

but this is not launch. so i think the value(follow_path) is not correct. maybe. the parameter value is just one(navigate_to_pose)>

@aaronchongth
Copy link
Member

Hi @kyu8456!

As a result, the TinyRobot's state is build time_stamp on rmf_core but that isn't move to rmf_task. so why? what can i change the file?

Apologies, I'm don't quite understand your question, is it possible to give me an example of what you're trying to achieve or perhaps rephrase your question?

so the client is two(tb3, tinyRobot) and server is one right? i make the tinyRobot and tb3 are build on rmf_core(nav_graph)

If you are trying to run both turtlebot3 and tinyRobot, you would need turtlebot3 with free fleet and full control fleet adapter, while tinyRobot with the tinyRobot fleet adapter (not through free fleet).

Free fleet interacts directly with the navigation stack of the robot, which tinyRobot does not use.

I want to tinyRobot moving just follow path line. so i don't need navigate_to_pose. and i try to change the value="/navigate_to_pose" ----> value="/follow_path"

As mentioned tinyRobot uses the slotcar plugin, not nav2, so it should follow the paths as drawn out in your navigation graph without deviating.

@eeoon
Copy link
Author

eeoon commented Aug 8, 2023

thank you @aaronchongth !

I was curious that tinyRobot didn't move even though it received a command from Rmf.

So in my opinion, to solve this problem, you can solve the error below.

[free_fleet_client_ros2-11] [ERROR] [1691337344.234318697] [transformPoseInTargetFrame]: Extrapolation Error looking up target frame: Lookup would require extrapolation into the past. Requested time 758.837000 but the earliest data is at time 1691337334.253269, when looking up transform from frame [tinyRobot_base_footprint] to frame [map]

I check the tf_tree like picture. the tinyRobot_odom isn't connect the map. so the tinyRobot isn't moving maybe.

One more thing to worry about is that TinyRobot doesn't have a controller, but I don't know if it will be able to move when a command is patrol from rmf. Because i want this robot to show movements that don't use nav2.

Screenshot from 2023-08-08 17-16-37

Screenshot from 2023-08-08 17-16-53

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

2 participants