Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenScenario support - TeleportAction #703

Open
Sumza opened this issue Dec 8, 2020 · 10 comments
Open

OpenScenario support - TeleportAction #703

Sumza opened this issue Dec 8, 2020 · 10 comments
Assignees

Comments

@Sumza
Copy link
Contributor

Sumza commented Dec 8, 2020

I have observed that when TeleportAction is used, the entity gets teleported to the required location but with the reset in velocity ( i.e. Entity velocity comes back to zero) and then the consecutive events are executed.

Is this the desired behaviour or any future updations is in progress for the TeleportAction tag ?

@glopezdiest glopezdiest self-assigned this Dec 11, 2020
@glopezdiest
Copy link
Contributor

Hey @Sumza, we have no current plans to change the TeleportAction, and yes, the reset of velocity is intentional, for stability purposes. Is it bothering you in any way that reset? we are mainly using it when spawning actors, so if that's the case, I'm curious to see your use case

@Sumza
Copy link
Contributor Author

Sumza commented Dec 11, 2020

Hey @glopezdiest , we are using Teleport action in story to achieve Re-Initialization of traffic objects with desired relative position and keep the velocity. We also observe that Teleport Action affects the stability of TV if started with previously achieved velocity in curve road profile.
Is there any other way to achieve the re-initialization of traffic without reset of velocity during the simulation?

@glopezdiest
Copy link
Contributor

I see. If you really don't want to reset the velocities, you can directly remove it. You can go to srunner/scenariomanager/scenarioatomics/atomic_behaviors.py, class ActorTransformSetterToOSCPosition and remove this part of the code at the initialize function

if self._actor.is_alive:
    self._actor.set_target_velocity(carla.Vector3D(0, 0, 0))
    self._actor.set_target_angular_velocity(carla.Vector3D(0, 0, 0))

@Sumza
Copy link
Contributor Author

Sumza commented Feb 22, 2021

Thankyou for your Input, It helped my requirement.

I tried implementing the Teleport Action on a curved road and below is the observed behaviour video output :

TeleportAction_CurvedRoad.mp4

When the Traffic vehicle is teleported from one part of the curved road to another part of the same curved road, we can see that the vehicle takes a small time gap to adjust to the teleported part of the curved road.

Is there any way this time delay can be avoided while Teleporting vehicles on Curved Road ?

@glopezdiest
Copy link
Contributor

I'm sorry but for me, it seems like your video is corrupted. Is it also happening on your end? Can you perhaps re-upload it

@Sumza
Copy link
Contributor Author

Sumza commented Feb 25, 2021

The video is playing fine at my end, i am re-uploading the video.

Kindly check and let me know its running fine you this time.

TeleportAction_CurveRoad.mp4

@glopezdiest
Copy link
Contributor

Okay, yeah, its works fine for me now. I don't think we ever designed the TeleportAction to work as you are using it so there are bound to be some errors. How are you controlling that vehicle? XOSC controllers use the local planner, which has a waypoint buffer and you probably aren't resetting it, maybe that's causing some issues

@WindTi
Copy link

WindTi commented Dec 7, 2021

Okay, yeah, its works fine for me now. I don't think we ever designed the TeleportAction to work as you are using it so there are bound to be some errors. How are you controlling that vehicle? XOSC controllers use the local planner, which has a waypoint buffer and you probably aren't resetting it, maybe that's causing some issues

Hello, you mentioned local planner and waypoint buffer, how can I reset them?

@glopezdiest
Copy link
Contributor

What version of CARLA are you using? We improved the agents a lot for 0.9.12 and they work differently.

For > 0.9.12, check this variable, which is a list of future waypoints the vehicle will pas through. On teleport, you'd have to reset that to be empty. For previous versions, you'll want to reset two variables (this and this).

However, I don't know if that alone will be enough as I've personally never tried it.

@WindTi
Copy link

WindTi commented Dec 10, 2021

您使用的是哪个版本的 CARLA?我们在 0.9.12 中对代理进行了大量改进,它们的工作方式有所不同。

对于 > 0.9.12,检查这个变量,它是车辆将通过的未来航点列表。在传送时,您必须将其重置为空。对于以前的版本,您需要重置两个变量(thisthis)。

但是,我不知道仅凭这一点是否足够,因为我个人从未尝试过。

What version of CARLA are you using? We improved the agents a lot for 0.9.12 and they work differently.

For > 0.9.12, check this variable, which is a list of future waypoints the vehicle will pas through. On teleport, you'd have to reset that to be empty. For previous versions, you'll want to reset two variables (this and this).

However, I don't know if that alone will be enough as I've personally never tried it.

Thanks for the reply, I am using carla0.9.12. I have not used the method you mentioned, I will try it later. At present, after trying to use RoutingAction->AssignRouteAction->Route->waypoint->position->relativelaneposition (reset the start point and the end point), I solved the problem of the object on the straight road.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants