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 use full_coverage_path_planner and path_tracking_pid? #155

Open
Tang-Kalman opened this issue Oct 13, 2022 · 3 comments
Open

how to use full_coverage_path_planner and path_tracking_pid? #155

Tang-Kalman opened this issue Oct 13, 2022 · 3 comments

Comments

@Tang-Kalman
Copy link

Thank for sharing u code. When I use full_coverage_path_planner and path_tracking_pid, I can not make it run. please help me. thanks.
image

this is the launch:

<!--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/planners.yaml" command="load" />
    <rosparam file="$(find full_coverage_path_planner)/test/full_coverage_path_planner/param/local_costmap_params.yaml" command="load" />
    <rosparam file="$(find path_tracking_pid)/param/controllers.yaml" command="load" />
    <rosparam file="$(find path_tracking_pid)/param/path_tracking_pid.yaml" command="load" />
    <param name="SpiralSTC/robot_radius" value="$(arg robot_radius)"/>
    <param name="SpiralSTC/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/SpiralSTC/plan" to="/move_base/SpiralSTC/plan"/>
    <!-- <remap from="/move_base_flex/PathTrackingPID/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="SpiralSTC" />
    <param name="base_local_planner" value="PathTrackingPID" />
</node>

<!-- Mobile robot simulator -->
<node pkg="mobile_robot_simulator" type="mobile_robot_simulator_node" name="mobile_robot_simulator" output="screen">
    <param name="publish_map_transform" value="true"/>
    <param name="publish_rate" value="10.0"/>
    <param name="velocity_topic" value="/move_base/cmd_vel"/>
    <param name="odometry_topic" value="/odom"/>
</node>

<!--We need a map to fully cover-->
<node name="grid_server" pkg="map_server" type="map_server" args="$(arg map)">
    <param name="frame_id" value="map"/>
</node>

<!-- Launch coverage progress tracking -->
<node pkg="tf" type="static_transform_publisher" name="map_to_coveragemap" args="$(arg coverage_area_offset) map coverage_map 100" />
<node pkg="full_coverage_path_planner" type="coverage_progress" name="coverage_progress">
    <param name="~target_area/x" value="$(arg coverage_area_size_x)" />
    <param name="~target_area/y" value="$(arg coverage_area_size_y)" />
    <param name="~coverage_radius" value="$(arg tool_radius)" />
    <remap from="reset" to="coverage_progress/reset" />
    <param name="~map_frame" value="/coverage_map"/>
</node>

<!-- Trigger planner by publishing a move_base goal -->
<node name="publish_simple_goal" pkg="rostopic" type="rostopic"  launch-prefix="bash -c 'sleep 1.0; $0 $@' "
    args="pub --latch /move_base/goal move_base_msgs/MoveBaseActionGoal --file=$(find full_coverage_path_planner)/test/simple_goal.yaml"/>

<!-- rviz -->
<node if="$(eval rviz)" name="rviz" pkg="rviz" type="rviz" args="-d $(find full_coverage_path_planner)/test/full_coverage_path_planner/fcpp.rviz" />
@Tang-Kalman
Copy link
Author

@Timple

@Timple
Copy link
Member

Timple commented Oct 13, 2022

Hi, as stated by the error, the poses should align with the path such that a diff-drive controller can follow it. Internally this controller uses these poses.

Seems like full_coverage_path_planner is publishing plans with poses not pointing in the direction of the path.

This should also be visible in rviz if you turn on visualization of the poses. Your launchfile example is missing elements for launch it unfortunately. But it should be easy to view in rviz.

It might be easier to use the tracking_pid package which does not have this requirement.

@Tang-Kalman
Copy link
Author

thanks

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