jynxmagic / FCPP-Survey

Comparison of different full coverage path planning techniques. Older methods and newer methods are both included.
Apache License 2.0
15 stars 4 forks source link

123 #4

Closed 1234564lll closed 10 months ago

1234564lll commented 10 months ago

do you know how to use in the plugin

jynxmagic commented 10 months ago

Hi,

The repository description has been updated to include more detailed installation information.

For a list of the FCPP algorithms included in the repository, see the launch files included here: https://github.com/jynxmagic/FCPP-Survey/tree/master/test%2Ffull_coverage_path_planner

1234564lll commented 10 months ago

你好啊

存储库描述已经更新,以包括更详细的安装信息。

有关存储库中包含的FCPP算法列表,请参阅此处包含的启动文件: https://github.com/jynxmagic/FCPP-Survey/tree/master/test%2Ffull_coverage_path_planne

Does this mean that I only need to modify the global planner and yaml file of the movebase, but the car seems to be stuck and unable to complete path exploration? Have you tried it

jynxmagic commented 10 months ago

Hey. Yes, it works by changing the global planner in the movebase package.

If you are using the ACO planner, it takes a while before it finds the optimal path. ACO finds optimal, but it takes some time. Don't use ACO with big maps. For the default map, it takes ACO 56 seconds to find the optimal path. The path is more optimal but takes a long time to find.

For big maps, spiral or zig-zag is better. roslaunch full_coverage_path_planner test_spiral_fcpp.launch roslaunch full_coverage_path_planner test_zigzag_fcpp.launch

You can change the map in the launch files (line 4): <arg name="map" default="$(find full_coverage_path_planner)/maps/grid.yaml"/>

For a list of available maps, see https://github.com/jynxmagic/FCPP-Survey/tree/master/maps.

1234564lll commented 10 months ago

Hey. Yes, it works by changing the global planner in the movebase package.

If you are using the ACO planner, it takes a while before it finds the optimal path. ACO finds optimal, but it takes some time. Don't use ACO with big maps. For the default map, it takes ACO 56 seconds to find the optimal path. The path is more optimal but takes a long time to find.

For big maps, spiral or zig-zag is better. roslaunch full_coverage_path_planner test_spiral_fcpp.launch roslaunch full_coverage_path_planner test_zigzag_fcpp.launch

You can change the map in the launch files (line 4): <arg name="map" default="$(find full_coverage_path_planner)/maps/grid.yaml"/>

For a list of available maps, see https://github.com/jynxmagic/FCPP-Survey/tree/master/maps.

thanks。But I want to know if it can be used as a movebase plugin. I think this one looks like a movebaseflex plugin

1234564lll commented 10 months ago

Hey. Yes, it works by changing the global planner in the movebase package.

If you are using the ACO planner, it takes a while before it finds the optimal path. ACO finds optimal, but it takes some time. Don't use ACO with big maps. For the default map, it takes ACO 56 seconds to find the optimal path. The path is more optimal but takes a long time to find.

For big maps, spiral or zig-zag is better. roslaunch full_coverage_path_planner test_spiral_fcpp.launch roslaunch full_coverage_path_planner test_zigzag_fcpp.launch

You can change the map in the launch files (line 4): <arg name="map" default="$(find full_coverage_path_planner)/maps/grid.yaml"/>

For a list of available maps, see https://github.com/jynxmagic/FCPP-Survey/tree/master/maps.

I used it as a Movebase plugin, but the car has two target points during driving, causing it to move back and forth. How can I solve this problem

jynxmagic commented 10 months ago

Hey,

I'm not sure how to port over to the move_base package.

My guess would be to do with the nav_msgs::Path object.

https://github.com/jynxmagic/FCPP-Survey/blob/master/src/full_coverage_path_planner.cpp

void FullCoveragePathPlanner::publishPlan(const std::vector<geometry_msgs::PoseStamped>& path)
{
  if (!initialized_)
  {
    ROS_ERROR("This planner has not been initialized yet, but it is being used, please call initialize() before use");
    return;
  }

  // create a message for the plan
  nav_msgs::Path gui_path;
  gui_path.poses.resize(path.size());

  if (!path.empty())
  {
    gui_path.header.frame_id = path[0].header.frame_id;
    gui_path.header.stamp = path[0].header.stamp;
  }

  // Extract the plan in world co-ordinates, we assume the path is all in the same frame
  for (unsigned int i = 0; i < path.size(); i++)
  {
    gui_path.poses[i] = path[i];
  }

  plan_pub_.publish(gui_path);
}

Or altering the .yaml file

    <!--Move base flex, using the full_coverage_path_planner-->
    <node pkg="mbf_costmap_nav" type="mbf_costmap_nav" respawn="false" name="move_base_flex" output="screen" required="true">
        <param name="tf_timeout" value="1.5"/>
        <rosparam file="$(find full_coverage_path_planner)/test/full_coverage_path_planner/param/aco_planner.yaml" command="load" />
        <rosparam file="$(find full_coverage_path_planner)/test/full_coverage_path_planner/param/local_costmap_params.yaml" command="load" />
        <param name="AntColonyOptimization/robot_radius" value="$(arg robot_radius)"/>
        <param name="AntColonyOptimization/tool_radius" value="$(arg tool_radius)"/>
        <param name="global_costmap/robot_radius" value="$(arg robot_radius)"/>
        <remap from="odom" to="/odom"/>
        <remap from="scan" to="/scan"/>

        <remap from="/move_base_flex/AntColonyOptimization/plan" to="/move_base/AntColonyOptimization/plan"/>
        <remap from="/move_base_flex/tracking_pid/interpolator" to="/move_base/TrackingPidLocalPlanner/interpolator"/>
    </node>

    <!-- Move Base backwards compatibility -->
    <node pkg="mbf_costmap_nav" type="move_base_legacy_relay.py" name="move_base" >
        <param name="base_global_planner" value="AntColonyOptimization" />
    </node>
1234564lll commented 10 months ago

so what should i do

原始邮件

发件人:"Chris Carr"< @.*** >;

发件时间:2023/11/24 20:16

收件人:"jynxmagic/FCPP-Survey"< @.*** >;

抄送人:"1234564lll"< @. >;"Author"< @. >;

主题:Re: [jynxmagic/FCPP-Survey] 123 (Issue #4)

Hey,

I'm not sure how to port over to the move_base package.

My guess would be to do with the nav_msgs::Path object.

https://github.com/jynxmagic/FCPP-Survey/blob/master/src/full_coverage_path_planner.cpp void FullCoveragePathPlanner::publishPlan(const std::vector<geometrymsgs::PoseStamped>& path) { if (!initialized) { ROS_ERROR("This planner has not been initialized yet, but it is being used, please call initialize() before use"); return; } // create a message for the plan nav_msgs::Path gui_path; gui_path.poses.resize(path.size()); if (!path.empty()) { gui_path.header.frame_id = path[0].header.frame_id; gui_path.header.stamp = path[0].header.stamp; } // Extract the plan in world co-ordinates, we assume the path is all in the same frame for (unsigned int i = 0; i < path.size(); i++) { gui_path.poses[i] = path[i]; } planpub.publish(gui_path); }
Or altering the .yaml file