nobleo / path_tracking_pid

Path Tracking PID offers a tuneable PID control loop, decouling steering and forward velocity
Apache License 2.0
129 stars 38 forks source link

Regarding the inability to trace the global path? #8

Open ju-mingyue opened 2 years ago

ju-mingyue commented 2 years ago

Hello, I am using this package alone to follow the global path planned by myself, but the effect is very poor, mainly as follows:

  1. The robot can only follow in a straight line, and it will deviate greatly when turning, and it will not even be able to track until the path will eventually stop.
  2. The robot will stop when it approaches an obstacle, but when there is a new path, the robot will still stop and cannot move unless the robot is repositioned. The following are the parameters I configured:

    controllers.yaml

    controllers:

    • name: PathTrackingPID type: path_tracking_pid/TrackingPidLocalPlanner PathTrackingPID: holonomic_robot: false track_base_link: true estimate_pose_angle: false base_link_frame: base_link Kd_ang: 0.3 Kd_lat: 0.3 Ki_ang: 0.0 Ki_lat: 0.0 Kp_ang: 1.0 Kp_lat: 1.0 l: 1.0 feedback_ang: false feedback_lat: true feedforward_ang: false feedforward_lat: true controller_debug_enabled: true target_end_x_vel: 0.0 target_x_acc: 2.0 target_x_decc: 2.0 target_x_vel: 2.0 abs_minimum_x_vel: 0.0 max_error_x_vel: 1.0 max_yaw_vel: 2.0 max_yaw_acc: 2.0 min_turning_radius: 0.0

    use_mpc: false mpc_max_error_lat: 0.5 mpc_max_fwd_iter: 200 mpc_max_vel_optimization_iterations: 5 mpc_min_x_vel: 0.5 mpc_simulation_sample_time: 0.05

    anti_collision: true obstacle_speed_reduction: true collision_look_ahead_resolution: 1.0 # [m]

    global_frame_id: odom map_frame: map

    controller_frequency: 5.0 controller_max_retries: 0

ju-mingyue commented 2 years ago

@Timple

Timple commented 2 years ago

How is the tracking behavior of the robot itself?

Can you provide a plot with the cmd_vel angular.z value and the odom twist.rotational.z components during the tracking of a corner?

ju-mingyue commented 2 years ago

@Timple Hello, I just tested it and recorded a video, you can check the link below, the problem in the video may be more clear https://youtu.be/dRqwf_Ed-l4

My robot is not a cleaning robot, I just hope it can follow the global path more accurately, mainly for tracking or pure path tracking.

Timple commented 2 years ago

It should be able to do better than this. Video is clarifying.

However comparing the numbers in the terminal is tricky. Would you mind using plotjuggler to plot these to values?

In short:

sudo apt install ros-noetic-plotjuggler-ros
rosrun plotjuggler plotjuggler
ju-mingyue commented 2 years ago

@Timple I drew the curve of odom, but the curve of cmd_vel did not come out. The following video link includes the change of the curve: https://youtu.be/kYKbNohFzug 深度截图_选择区域_20211202164023

Timple commented 2 years ago

Still really hard to compare them. If you don't succeed adding it to plotjuggler, can you add odometry to the graph above?

ju-mingyue commented 2 years ago

@Timple Hello, I have added the cmd_vel curve, as shown in the figure above

Timple commented 2 years ago

Yes I see. The request was to add odometry to that graph. So both lines are in a single graph.

This way we can rule-out any strange turning behavior.