hatem-darweesh / autoware.ai.openplanner

The workspace for directly downloading and installing Autoware.AI versions with the latest OpenPlanner 2.5 updates
Apache License 2.0
39 stars 7 forks source link

issue in pure_pursuit #3

Closed leizi111 closed 3 months ago

leizi111 commented 2 years ago

Hello Hatem, when I use openplanner with carla simulator, the pure_pursuit node always show a warn.[ WARN] [1651136464.080545931]: Waiting for current_pose topic ... but the current_pose topic is active and have data. And I use rostopic info /current_pose command, it also show subscribed by /pure_pursuit, the terminal display is as below:

Type: geometry_msgs/PoseStamped
Publishers: 
 * /carla_to_autoware_localization (http://tsy-vpc:38061/)

Subscribers: 
 * /rviz (http://tsy-vpc:40747/)
 * /op_global_planner (http://tsy-vpc:45831/)
 * /lidar_kf_contour_track (http://tsy-vpc:45543/)
 * /lane_select (http://tsy-vpc:41061/)
 * /op_trajectory_generator (http://tsy-vpc:44749/)
 * /op_motion_predictor (http://tsy-vpc:45847/)
 * /op_trajectory_evaluator (http://tsy-vpc:46739/)
 * /op_behavior_selector (http://tsy-vpc:45287/)
 * /pure_pursuit (http://tsy-vpc:40057/)

How can I fix this issue? I am looking forward to your answer, thanks!

hatem-darweesh commented 2 years ago

You can ignore the warning from pure_pursuit, or disable it from the code. Usually I don't use pure_pursuit with CARLA simulator. I use op_waypoint_follower instead.

quliang93 commented 2 years ago

Hi guys, I also noticed this problem. I add the line: "cout << "Message Got!" << endl;" into current_pose/current_velocity/final_waypoints callback functions in pure_pursuit_core.cpp. I want to confirm that I really subscribed messages from 4 required topic in pure_pursuit, but I got nothing.

But when I "rostopic echo /ctrl_raw", I got outputs but they are not in the Twist-type, which for robot controling. If the pure_pursuit node failed to subscribe those topics, why it can output commands?

I tested the OpenPlanner-2.5 with wf_simulator, but when I make everything ok, like the video shows, https://www.youtube.com/watch?v=7sj1IR_nH7Q&feature=youtu.be, pure_pursuit didn't work.

Could anyone give some advice? Thanks a lot.

quliang93 commented 2 years ago

Hi, @leizi111 Maybe I can help with you. First, please check whether the topic "/ctrl_raw" or "/ctrl_cmd" can output something when you open pure_pursuit and twist_filter node. If everything is fine, that means pure_pursuit node is ok. You know, the control command in carla should be a "TwistStamped" type(if you use carla-ros-bridge). Here is what I did: Check the codes in pure_pursuit_core.cpp in Line 74, Line 78, and make the variable outputinterface = "all";

This will guarantee the pure_pursuit node outputs in a TwistStamped type. After that, please check the "/twist_cmd" , if this topic can output the velocity, everything will be fine. (That is what I did)

use command belew to MAKE your pure_puresuit only: cd autoware.ai.openplanner

colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release -packages-select pure_pursuit

This change can make pure pursuit node work with carla, but still can not work with wf_simulator. Weird. Hope someone else could give some advice about that. Good luck!

leizi111 commented 2 years ago

Thanks a lot for your answer, now my pure_pursuit node works fine in carla, your method is really useful!

ErvinZzz commented 2 years ago

@hatem-darweesh Hello sir, is the op_waypoint_follower node included in Autoware.AI? I am facing issues on the pure pursuit node as well and am not able to find the op_waypoint_follower node you mentioned in Autoware.AI 1.15 with the latest open planner.

hatem-darweesh commented 2 years ago

Yes it does exist: https://github.com/hatem-darweesh/core_planning/tree/openplanner.1.15/op_waypoint_follower