What is the expected default behavior when encountering an obstacle in the road during autopilot?

Hello Everyone!

Can someone please describe the expected default behavior when encountering an obstacle in the road (like a rock, tree, branch) when on autopilot? I’ve created a map and purposely placed obstacles in the road.

I believe I’m seeing the detection of an obstacle, and then the inability of the vehicle to navigate around or through it. It appears to get stuck. Is this the expected behavior, on autopilot?

Is there a way to temporarily turn off sensing of obstacles in the road, and allow the vehicle to “pass through” an obstacle?

Is autopilot navigation capable of changing lanes to avoid an obstacle?

Is there a way to manually drive (not fly) along a road?

Thanks for your thoughts on this! I am new in this space…

Hey @marybp, let’s split your doubts in parts.

Can someone please describe the expected default behavior when encountering an obstacle in the road (like a rock, tree, branch) when on autopilot?

The autopilot doesn’t detect anything other than vehicles, as all other objects (trees, garbage, rocks…) aren’t meant to be at the road.

Is there a way to temporarily turn off sensing of obstacles in the road, and allow the vehicle to “pass through” an obstacle?

Kinda, you can use the TM’s hybrid mode, which disables physics of vehicle that are far away from the ego vehicle, but that isn’t its expected use, so there might be some issues
traffic_manager.set_hybrid_physics_mode(True / False) activates / deactivates it

Is autopilot navigation capable of changing lanes to avoid an obstacle?

It is capable of doing so if there the obstacle in front is another vehicle but it is impossible for any other obstacles as again, they aren’t detected. However, the autopilot it will never enter a lane that goes in the opposite direction

Is there a way to manually drive (not fly) along a road?

What do you mean here?

Hello @GuillermoLopez - thanks for the reply! It seems that the autopilot does detect obstacles in the road, from all of the tests I’ve run, since I posted this… I created a custom map seeded with obstacles, on purpose, because I want to detect and assess these obstacles. This is a practical use case, because autonomous vehicles should know what to do when they encounter an obstacle, and should be able to respond appropriately to different kinds of obstacles. You can drive over a small plant growing in a crack in a road, for example, but not a fallen tree. In every test I’ve run, whenever the ego vehicle encounters one of these obstacles during autopilot, it stops in front of it, does not progress, and does not attempt to navigate around it, by default (at least, not with the Carla setup I currently have).

I attempted to turn off physics, but this did not seem to help. I’ll have another look at that, though.

The reason for wanting to pass through objects is that I can run my vehicle around a navigation path, and collect data, without having the vehicle get stuck. It’s relatively easy to discard invalid data samples compared to dealing with getting stuck when obstacles are encountered.

Sorry about the lack of explanation about the drive (not fly) part of the question (must have been in a rush when I posted this)… If you manually navigate around a map, you can literally fly through buildings. It would be helpful to be able to manually navigate, passing through objects for some simple testing, while staying in contact with the road/ground. Is this possible?

Thanks so much again for the reply!

Cheers,
marybp

Hi marybp,

regarding the navigation, what you describe is not intended to happens in Carla, that’s why it is not “supported”. You can may find a way to create a just-in-time waypoint to mitigate the problem and if it is feasible, modifying temporarly the trajectory of the vehicles, but you need to pay attention about incoming vehicles/pedestrian, there should be the space to begin and do the manouvrer, lights etc… many things to care about, it is challenging let’s say. You can eventually disable the environment objects disabling temporarly the objects that are in front of the car that is stucked for too much. I don’t know if there is a way to find the correct object id, but this may can be an idea.

Regarding the camera, the simplest way is to use a spectator and attach it to a vehicle (eventually controlled by you). You can use the manual_control.py example and adjust the spectator position.