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

Open Planner Not working with Carla #8

Closed jfqureshi closed 1 year ago

jfqureshi commented 2 years ago

Hello I am using Carla+Autoware1.15 from hatem's fork to implement obstacle avoidance.

I am using launch files for my environment. In my case, i get a global path but not the local roll_outs.

My /local_trajectories_gen_rviz is a straight line(image below).

Global Path --> https://drive.google.com/file/d/1c6Cel5U7n17aorpwUaCVFU_C1-Yr2oDw/view?usp=sharing

Local Path --> https://drive.google.com/file/d/1_xXmKlipY17XmKLSUeO_mKhywFEqkkY_/view?usp=sharing

And my vehicle does not move.

I echoed the rostopics but they are not empty.

I received the following warning in my terminal: Warning From Trajectory Evaluator, paths size mismatch, GlobalPaths: 0, LocalPaths: 1 Received New Global Path Selector!

Could you please be able to assist me.

Thanks

hatem-darweesh commented 2 years ago

I am sure it is just some parameters issue. can you try your experiment using runtime_manager ?

jfqureshi commented 2 years ago

I have never used run time manager for autoware but I will try and let you know.

Please find attached the screen recordings:

https://drive.google.com/file/d/1C4CeEGrR5Y_WdImF-6N9w0OS5tCBcItn/view?usp=sharing

https://drive.google.com/file/d/1lIG_-RYhfvCzzau9vWqSpWVKxqr-06DM/view?usp=sharing

https://drive.google.com/file/d/1wf5o6SAmggyS1EhnPyLBnZ4nM2xwwSwP/view?usp=sharing

hatem-darweesh commented 2 years ago

It is something with the control part:

jfqureshi commented 2 years ago

It is something with the control part:

  • what controller do you use, pure pursuit or waypoint follower ?
  • how do you connect control signal with lgsvl
  • is there a max velocity param = 0 in op_common_params or controller launch files ?

https://drive.google.com/file/d/1dteXSs2PeVJ-NGv5xH_ONYE6NRCJWuah/view?usp=sharing

https://drive.google.com/file/d/1jm89ptpO_7NSr_HyckWhBrJ6jnIjEm1b/view?usp=sharing

hatem-darweesh commented 2 years ago

are you using velocity mode or stroke mode ? are the acceleration value is too small ? are you using internal_acc or not ?

jfqureshi commented 2 years ago

are you using velocity mode or stroke mode ? are the acceleration value is too small ? are you using internal_acc or not ?

jfqureshi commented 2 years ago

are you using velocity mode or stroke mode ? are the acceleration value is too small ? are you using internal_acc or not ?

  • I am using stroke mode
  • max_accel_value = 70%
  • enableSimulationMode = 2(direct_control)
  • I don't know what do you mean by using internal_acc.

I changed the steer_mode to steer angle and drive_mode to velocity. Now my vehicle is moving but it is not avoiding the obstacle.

P.S: My lidar_euclidean_cluster_detect node is not launched. Instead it uses simu_cloud_clusters from op_perception_simulator node. And the topic simu_cloud_clusters which is subscribed by lidar_kf_contour_track node is empty.

hatem-darweesh commented 2 years ago

you have one rollout generated. obstacle avoidance is not enabled in the local planner. or rollout number is 1

jfqureshi commented 2 years ago

you have one rollout generated. obstacle avoidance is not enabled in the local planner. or rollout number is 1

The rollout_number in my op_common_params.launch(inside op_agend) was 0 and I set it to 6. Now I have two global paths but my local roll_out is zero.

I get this error: Waiting until nodes are synchronized, Generated rollouts = 3, But They should =1``

The vehicle obviously does not move, Here is the video: https://drive.google.com/file/d/1iLwA4K_-Te68LiUxQT4An3e8UHsk3G7J/view?usp=sharing

Then when I also change the roll_out number in op_local_planner.launch to 6 from 8, the vehicle crashes again.

I did not find any obstacle avoidance parameter.

hatem-darweesh commented 2 years ago

You have enabled lane change , not obstacle avoidance ! check which launch file is actually called and change the parameters in a consistent way.

jfqureshi commented 2 years ago

You have enabled lane change , not obstacle avoidance ! check which launch file is actually called and change the parameters in a consistent way.

Thanks, actually the parameter is enableSwerving. I corrected it and the enableFollowing parameter to true everywhere. Now, i get 6 local rollout numbers. I use lidar_euclidean_detect node.

The car detects the obstacle and tries to avoid it. But it does not avoid it effectively and efficiently. It gets stuck near the obstacle, here is the video.

https://drive.google.com/file/d/1BQb49zLp71djoEsAcF7Pfyq_h9hKwOtG/view?usp=sharing

And also, I have set enableLaneChange to true in local planner but false in global_planner.

hatem-darweesh commented 2 years ago

Please check the current driving state (behavior) also check if the correct velocity is sent. it appears that all rollouts are red. so it should slow down.

jfqureshi commented 2 years ago

Please check the current driving state (behavior) also check if the correct velocity is sent. it appears that all rollouts are red. so it should slow down.

Thanks for the reply.

The velocities are consistent. I mean to say that velocity published by op_behavior_selector(twist_raw) is same as the velocity published by the following nodes.

When the vehicle reaches the goal, the state is stop, but the vehicle does not stop sometimes. It keeps on moving until it crashes into something(even if the state is stop). But sometimes, it stops just after the goal. Here is the video of one of the cases: https://drive.google.com/file/d/1w_G1ilzPaVbI2nOaUxwB_9t8lzcznmc2/view?usp=sharing

And I get the message in console: Goal Found, LaneID: 36, Distance : 0, Angle: 0 Info: PlannerH -> Plan (A) Path With Size (36), MultiPaths No(1) Extraction Time : New DP Path -> 36 Received New Global Paths Evaluator ! 1

My op_behavior_selector launch parameters.

hatem-darweesh commented 2 years ago

It seem the controller does not receive control information from op_behavior_selector , or it is poorly tuned. Set max velocity in op_common_params to zero. if the vehicle moves. then check which node send velocity value larger than zero

jfqureshi commented 2 years ago

Please check the current driving state (behavior) also check if the correct velocity is sent. it appears that all rollouts are red. so it should slow down.

And finally, I set the maximum speed everywhere as 2.0 m/s. Now, I have same speed from every node. Now the vehicle crashes into the obstacle. Here is the video. https://drive.google.com/file/d/1pNBsoEnYeqVMW0vcw_w-e9ESqo_6i9ER/view?usp=sharing The state is follow which you can see in the video.

jfqureshi commented 2 years ago

It seem the controller does not receive control information from op_behavior_selector , or it is poorly tuned. Set max velocity in op_common_params to zero. if the vehicle moves. then check which node send velocity value larger than zero

When I set the maxVelocity in op_common_params as zero, the vehicle does not move.

hatem-darweesh commented 2 years ago

If you disable the serving (avoidance) does the vehicle follow next vehicle and stop for objects in front of it ? does it at least slow down ?

hatem-darweesh commented 2 years ago

I would say the ackerman bridge doesn't convert slow down to braking. or it doesn't brake hard enough

jfqureshi commented 2 years ago

If you disable the serving (avoidance) does the vehicle follow next vehicle and stop for objects in front of it ? does it at least slow down ?

No, when I disable avoidance, the vehicle does not stop. It crashes as before. The only difference is that there is just one feasible(blue) local roll out.

jfqureshi commented 2 years ago

I would say the ackerman bridge doesn't convert slow down to braking. or it doesn't brake hard enough

I don't think the problem is with Ackermann bridge. Because the twist_raw from the op_waypoint_follower doesn't appear to change. If it was supposed to brake, then the target speed should decrease. But that is not what is happening. The issue is either with the controller or the behavior selector.

Note:

jfqureshi commented 2 years ago

I would say the ackerman bridge doesn't convert slow down to braking. or it doesn't brake hard enough

@hatem-darweesh Do you have any video or a repo where you have noted the value of parameters for more or less stable and results. Because, as far as I have understood after trying to set the different parameters, one parameter change may effect multiple nodes. It would be very helpful. Thanks