magazino / move_base_flex

Move Base Flex: a backwards-compatible replacement for move_base
https://uos.github.io/mbf_docs/
BSD 3-Clause "New" or "Revised" License
424 stars 154 forks source link

turtlebot3_mbf: No plugin loaded with the given name "navfn/NavfnROS"! and The last action goal to "get_path" has been REJECTED #247

Closed fjp closed 3 years ago

fjp commented 3 years ago

Hi, I have troubles to send a 2D nav goal using this package with Gazebo turtlebot3_simulation. When I launch the following launchfiles from turtlebot3_simulation and turtlebot3_mbf from @Rayman on ROS noetic:

roslaunch turtlebot3_gazebo turtlebot3_world.launch

then the amcl_demo.launch from turtlebot3_mbf package:

roslaunch turtlebot3_mbf amcl_demo.launch

And finally setting a 2D Nav Goal in Rviz, turtlebot doesn't move and I get the following error and warning in the terminal:

[ WARN] [1607205100.267987148, 78.750000000]: No plugin loaded with the given name "navfn/NavfnROS"!
[ERROR] [1607205100.268080424, 78.750000000]: The last action goal to "get_path" has been REJECTED
Click for the complete terminal output ```console roslaunch turtlebot3_mbf amcl_demo.launch ... logging to /home/fjp/.ros/log/ddda414e-3743-11eb-aca7-4d40e2fd6e6c/roslaunch-tensorbook-336152.log Checking log directory for disk usage. This may take a while. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB. xacro: in-order processing became default in ROS Melodic. You can drop the option. started roslaunch server http://192.168.0.9:37991/ SUMMARY ======== PARAMETERS * /amcl/base_frame_id: base_footprint * /amcl/gui_publish_rate: 50.0 * /amcl/initial_pose_a: 0.0 * /amcl/initial_pose_x: 0.0 * /amcl/initial_pose_y: 0.0 * /amcl/kld_err: 0.02 * /amcl/laser_lambda_short: 0.1 * /amcl/laser_likelihood_max_dist: 2.0 * /amcl/laser_max_beams: 180 * /amcl/laser_max_range: 3.5 * /amcl/laser_model_type: likelihood_field * /amcl/laser_sigma_hit: 0.2 * /amcl/laser_z_hit: 0.5 * /amcl/laser_z_max: 0.05 * /amcl/laser_z_rand: 0.5 * /amcl/laser_z_short: 0.05 * /amcl/max_particles: 3000 * /amcl/min_particles: 500 * /amcl/odom_alpha1: 0.1 * /amcl/odom_alpha2: 0.1 * /amcl/odom_alpha3: 0.1 * /amcl/odom_alpha4: 0.1 * /amcl/odom_frame_id: odom * /amcl/odom_model_type: diff * /amcl/recovery_alpha_fast: 0.0 * /amcl/recovery_alpha_slow: 0.0 * /amcl/resample_interval: 1 * /amcl/transform_tolerance: 0.5 * /amcl/update_min_a: 0.2 * /amcl/update_min_d: 0.2 * /move_base_flex/DWAPlannerROS/acc_lim_theta: 3.2 * /move_base_flex/DWAPlannerROS/acc_lim_x: 2.5 * /move_base_flex/DWAPlannerROS/acc_lim_y: 0.0 * /move_base_flex/DWAPlannerROS/controller_frequency: 10.0 * /move_base_flex/DWAPlannerROS/forward_point_distance: 0.325 * /move_base_flex/DWAPlannerROS/goal_distance_bias: 20.0 * /move_base_flex/DWAPlannerROS/latch_xy_goal_tolerance: False * /move_base_flex/DWAPlannerROS/max_scaling_factor: 0.2 * /move_base_flex/DWAPlannerROS/max_vel_theta: 2.75 * /move_base_flex/DWAPlannerROS/max_vel_trans: 0.22 * /move_base_flex/DWAPlannerROS/max_vel_x: 0.22 * /move_base_flex/DWAPlannerROS/max_vel_y: 0.0 * /move_base_flex/DWAPlannerROS/min_vel_theta: 1.37 * /move_base_flex/DWAPlannerROS/min_vel_trans: 0.11 * /move_base_flex/DWAPlannerROS/min_vel_x: -0.22 * /move_base_flex/DWAPlannerROS/min_vel_y: 0.0 * /move_base_flex/DWAPlannerROS/occdist_scale: 0.02 * /move_base_flex/DWAPlannerROS/oscillation_reset_dist: 0.05 * /move_base_flex/DWAPlannerROS/path_distance_bias: 32.0 * /move_base_flex/DWAPlannerROS/publish_cost_grid_pc: True * /move_base_flex/DWAPlannerROS/publish_traj_pc: True * /move_base_flex/DWAPlannerROS/scaling_speed: 0.25 * /move_base_flex/DWAPlannerROS/sim_time: 1.5 * /move_base_flex/DWAPlannerROS/stop_time_buffer: 0.2 * /move_base_flex/DWAPlannerROS/vth_samples: 40 * /move_base_flex/DWAPlannerROS/vx_samples: 20 * /move_base_flex/DWAPlannerROS/vy_samples: 0 * /move_base_flex/DWAPlannerROS/xy_goal_tolerance: 0.05 * /move_base_flex/DWAPlannerROS/yaw_goal_tolerance: 0.17 * /move_base_flex/controller_frequency: 5.0 * /move_base_flex/controller_patience: 3.0 * /move_base_flex/controllers: [{'name': 'DWAPla... * /move_base_flex/global_costmap/cost_scaling_factor: 3.0 * /move_base_flex/global_costmap/footprint: [[-0.105, -0.105]... * /move_base_flex/global_costmap/global_frame: map * /move_base_flex/global_costmap/inflation_radius: 1.0 * /move_base_flex/global_costmap/map_type: costmap * /move_base_flex/global_costmap/observation_sources: scan * /move_base_flex/global_costmap/obstacle_range: 3.0 * /move_base_flex/global_costmap/publish_frequency: 10.0 * /move_base_flex/global_costmap/raytrace_range: 3.5 * /move_base_flex/global_costmap/robot_base_frame: base_footprint * /move_base_flex/global_costmap/scan/clearing: True * /move_base_flex/global_costmap/scan/data_type: LaserScan * /move_base_flex/global_costmap/scan/marking: True * /move_base_flex/global_costmap/scan/sensor_frame: base_scan * /move_base_flex/global_costmap/scan/topic: scan * /move_base_flex/global_costmap/static_map: True * /move_base_flex/global_costmap/transform_tolerance: 0.5 * /move_base_flex/global_costmap/update_frequency: 10.0 * /move_base_flex/local_costmap/cost_scaling_factor: 3.0 * /move_base_flex/local_costmap/footprint: [[-0.105, -0.105]... * /move_base_flex/local_costmap/global_frame: odom * /move_base_flex/local_costmap/height: 3 * /move_base_flex/local_costmap/inflation_radius: 1.0 * /move_base_flex/local_costmap/map_type: costmap * /move_base_flex/local_costmap/observation_sources: scan * /move_base_flex/local_costmap/obstacle_range: 3.0 * /move_base_flex/local_costmap/publish_frequency: 10.0 * /move_base_flex/local_costmap/raytrace_range: 3.5 * /move_base_flex/local_costmap/resolution: 0.05 * /move_base_flex/local_costmap/robot_base_frame: base_footprint * /move_base_flex/local_costmap/rolling_window: True * /move_base_flex/local_costmap/scan/clearing: True * /move_base_flex/local_costmap/scan/data_type: LaserScan * /move_base_flex/local_costmap/scan/marking: True * /move_base_flex/local_costmap/scan/sensor_frame: base_scan * /move_base_flex/local_costmap/scan/topic: scan * /move_base_flex/local_costmap/static_map: False * /move_base_flex/local_costmap/transform_tolerance: 0.5 * /move_base_flex/local_costmap/update_frequency: 10.0 * /move_base_flex/local_costmap/width: 3 * /move_base_flex/oscillation_distance: 0.2 * /move_base_flex/oscillation_timeout: 10.0 * /move_base_flex/planner_frequency: 1.0 * /move_base_flex/planner_patience: 5.0 * /move_base_flex/planners: [{'name': 'NavfnR... * /robot_description:

I have checked that ros-noetic-navfn is installed and from the complete output it seems that it even is loaded:

[ INFO] [1607205057.922843409, 36.453000000]: The plugin with the type "navfn/NavfnROS" has been loaded successfully under the name "NavfnROS".

Also the ros-noetic-move-base-flex and other ros-noetic-mbf-* packages seem to be installed. Here are the screenshots of the installed Ubuntu packages:

image image image

The node graph for turtlebot3_gazebo and the turtlebot3_mbf package looks like this:

image

And the process monitor:

image

When I run roswtf after I have launched the gazebo simulation and turtlebot3_mbf amcl_demo.launch I get the following output:

$ roswtf
Loaded plugin tf.tfwtf
No package or stack in the current directory
================================================================================
Static checks summary:

No errors or warnings
================================================================================
Beginning tests of your ROS graph. These may take a while...
analyzing graph...
... done analyzing graph
running graph rules...
... done running graph rules
running tf checks, this will take a second...
... tf checks complete

Online checks summary:

Found 2 warning(s).
Warnings are things that may be just fine, but are sometimes at fault

WARNING The following node subscriptions are unconnected:
 * /gazebo:
   * /gazebo/set_link_state
   * /gazebo/set_model_state
 * /amcl:
   * /initialpose
 * /move_base_legacy_relay:
   * /move_base_simple/goal
   * /move_base/goal
   * /move_base/cancel

WARNING These nodes have died:
 * spawn_urdf-4

Found 1 error(s).

ERROR The following nodes should be connected but aren't:
 * /move_base_flex->/move_base_flex (/move_base_flex/local_costmap/footprint)
 * /move_base_flex->/move_base_flex (/move_base_flex/global_costmap/footprint)

Is there anything else that I am missing to get turtlebot3 moving in the simulation?

echo4echo commented 3 years ago

Hi, @fjp , I met similar issue with you, I didn't check the demo but directly import the move_base_flex into my project. Then run simple goal in rviz: Screenshot from 2020-12-14 12-05-16 Same error, then I took lot time to find the issue and finally got the reason, hopefully help for u: I simply comment the following code in move_base_legacy_relay.py: mb_drs = Server(MoveBaseConfig, mb_reconf_cb) Then it works.

I think the reason behind this is: In: turtlebot3_mbf/launch/amcl_demo.launch, the code load old move base in move_base_legacy_relay.py: it load MoveBaseConfig from move_base.cfg. The move_base.cfg is actually under: https://github.com/ros-planning/navigation/blob/noetic-devel/move_base/cfg/MoveBase.cfg

If you don't specific anything, it will load the MoveBase.cfg from old move_base lib then of course it couldn't find the default plugin becasue you never define them, (or maybe it got replaced). You could also check the param /move_base_legacy_relay/controller_frequence to make sure wether it load the default MoveBase.cfg (20.0) or the customized frequence (5.0).

spuetz commented 3 years ago

Please see: https://github.com/magazino/move_base_flex/issues/240 and https://github.com/magazino/move_base_flex/issues/60

spuetz commented 3 years ago

Btw, at start up of MBF, it says which plugins are loaded. See https://github.com/magazino/move_base_flex/blob/03792606f77c4402b2e17bee2f9122b071b4b250/mbf_abstract_nav/include/mbf_abstract_nav/impl/abstract_plugin_manager.tcc#L94

jtoobias commented 3 years ago

Hi, I know this is closed I have the same issue with my own robot and when I try the turtlebot3 tutorial on the MBF wiki. The warning and error I get when I set a goal pose is: [ WARN] - /move_base_flex: [1625631360.383161930, 216.794000000] No plugin loaded with the given name "navfn/NavfnROS"! [ERROR] - /move_base_flex: [1625631360.383519016, 216.795000000] The last action goal to "get_path" has been REJECTED

I do have the plugin being accepted: [ INFO] - /move_base_flex: [1625631349.899322993, 206.333000000] The plugin with the type "navfn/NavfnROS" has been loaded successfully under the name "NavfnROS". [ INFO] - /move_base_flex: [1625631349.905273725, 206.339000000] Sim period is set to 0.10 [ INFO] - /move_base_flex: [1625631349.942617670, 206.377000000] The plugin with the type "dwa_local_planner/DWAPlannerROS" has been loaded successfully under the name "DWAPlannerROS".

I have attached my turtlebot3 tutorial files: turtlebot3_mbf.zip (which is exactly the same as the wiki one).

The only thing that makes it work is by commenting out the line @echo4echo mentioned above, but there must be a proper way.

The system I am using is Ubuntu 18.04, Melodic. I have looked at other Github answers but either I don't understand them or I feel like I have it already done, but I would think the tutorial would work and provide answers for setting it up. So if anyone can explain the solution clearly I would greatly appreciate it.

Thanks :)

spuetz commented 3 years ago

Hi @jtoobias. Have a lock at https://uos.github.io/mbf_docs/ The reason is that you have not configured MBF correctly or used the wrong name in the action call. At startup MBF prints the names and the types that were loaded. Cheers

jtoobias commented 3 years ago

Thank you for the very fast reply @spuetz. I took a look at the mbf_docs link you shared and noticed in all launch files the is never run, which is where my problem comes from.

I was able to go through the first couple of tutorials as well just to make sure it was working without the node, which I could do. (Also, very nice layout of tutorial on there).

So is this node not required anymore? I thought this node linked the move_base to the new move_base_flex.

Thank you for the help.

denesh-globotix commented 2 years ago

As mentioned by @echo4echo the problem seems to be coming from move_base_legacy_relay.py. I have added the following parameters under the node's private namespace and the error does not appear any longer. The name to be added is related to the name passed into the mbf_costmap_nav node's yaml file. Examples are show below:


planners:
  - name: 'GlobalPlanner'
    type: 'global_planner/GlobalPlanner'

controllers:
  - name: DWAPlannerROS
    type: dwa_local_planner/DWAPlannerROS
  <node name="move_base_legacy_relay" pkg="mbf_costmap_nav" type="move_base_legacy_relay.py">
    <param name="base_global_planner" value="GlobalPlanner" />
    <param name="base_local_planner" value="DWAPlannerROS" />
  </node>

An example can also be found in this commit: https://github.com/nobleo/full_coverage_path_planner/commit/450b3aad4077702e041fd0d698e4d741ba6777e6