Open ronyshaji opened 1 year ago
This is somewhat what the erratic behavior I observed too. Looking at your file, it seems that the waypoints you recorded are very close? I am uncertain if this is what's causing the issue, but for me, recording waypoints very wide apart (e.g., 30 meters) solved the issue. I have talked about this here.
@shh1v My use case is limited for only 5 meters with the vehicle entering into a parking lot. Thats why I choosed the close waypoints. But the vehicle is not even tracing the waypoints mentioned. It is spawning at the spawn point from the openscenario file and moves forward straight. That is confusing for me. Do we need to provide the value of 'h'(yaw) also to make the vehicle take a turn?
Hi, I have located a bug of CARLA and it might the cause of your problem. Firsly, Your description seems more appropriate to use "followTrajectoryAction". Acording to the definition of openscenario, the vehicle follows a specific points of a trajectory using this action. However, the vehicle always driving in the middle of the lane rather than follow your trajectory even if you use "followTrajectoryAction". It is a bug of Carla PythonAPI "carla.Map.get_waypoint()". The parameter "project_to_road" does not work at all, which means the method always return a point at the center of the lane no matter you use True or False for this para. So what really deliveried to the Carla controller is the points at the center of the lane instead of your pre defined points. It is hard problem. I tried to rewrite some python files in scenario_runner and Carla PythonAPI to fixed it.
@PrussianBbblue So you mean we can able to drive the vehicle whereever we wanted other than through waypoints if i used the followTrajectoryAction ?
@ronyshaji Theoretically, yes. But it still works as AssignRouteAction due to a bug of CARLA PythonAPI as I mentiond above.
@But in tht case, i can create a scenario in a parking lot in Town04 like parking our vehicle using any of the methods ? unfortunately there is no waypoints availáble in the parking lot.
@ronyshaji If there is no bug, it should works as you wish using followTrajectoryAction. I rewrite some files in scenario runner and Carla to use carla.Transform rather than carla.Waypoint to control the movement of the vehicle so that the vehicles don't have to stay at the center of the lane. And it does work well. You may have a try if neccesarry.
Hey can you share the link where you have the modified file? Also, do we need to create the openscenario with waypoints here or any other method?
@PrussianBbblue Hey, Can you share the repo where you have the edited code so that I can test the scenario? Also based on the discussion, is it still possible to drive anywhere through the map if i use the followTrajectoryAction even though there is no waypoint through that road ?
@ronyshaji Hi, sorry I cannot provide the code that I modified cuz it's part of work of the company. But I can say the key is to use transform rather than waypoint in npc_vehicle_control(in scenario_runner), local_planner and controller (in Carla). And yes, you can manage your car drive anywhere on the road using followTrajectoryAction.
@PrussianBbblue I think its like a full editing of the whole code as i see that it uses the waypoint in many areas. and it would be great if you can share your discord id or something so that i can ask you directly rather than here. Thanks for the feedback.
@PrussianBbblue Did you ever used the
I have a similar problem, I have customized the main car's trajectory and driving behavior by waypoint in qgis by mouse clicking on the town01 layer and outputting the xosc file, but when I run it with carla openscenario runner, I get an error saying: The content of element “Position” is not complete. For your reference, I have provided a link to my OpenScenario file-
I tried to modify the "waypoint" and "worldposition" part, but it still gives me an error.Thank you for your guidance in resolving this matter.
@ronyshaji Can you run this .xosc file by using scenario runner successfully ? I can not make it.
Hey all
I have successfully generated an OpenScenario file using qgis, where I have specified an ego vehicle and configured it to adhere to a series of waypoints. These waypoints were defined within the 'Town01' map on qgis. However, upon attempting to execute the .xosc file, I encountered an issue where the vehicle simply proceeded in a straight line rather than following the designated waypoints.
For your reference, I have provided a link to the OpenScenario file - WaypointScenario.
I have explored potential solutions by creating varied waypoints across different sections of the map, yet the problem persists. I am uncertain whether the waypoints need to be evenly spaced, and I am also curious about handling lane changes within the scenario.
Thank you for your guidance in resolving this matter.