[sumo-user] SUMO vehicle context subscriptions

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

[sumo-user] SUMO vehicle context subscriptions

Hriday Sanghvi
Hello,

I am a 2nd year PhD student at Trinity College Dublin, but I am new here.

I am trying to set a range on vehicles such that they detect the presence of any vehicle "X" metres in front of them. I am currently using a context subscription on each vehicle with a LaneFilter applied, setting downstreamDist to a value. ( https://sumo.dlr.de/daily/pydoc/traci._vehicle.html#VehicleDomain-addSubscriptionFilterLanes ). However, this does not seem to detect the vehicles "X" metres in a radial distance ( https://sumo.dlr.de/docs/TraCI/Interfacing_TraCI_from_Python.html#context_subscription_filters ) in the case where the vehicles meet each other at the intersection at a perpendicular angle.

It seems that using an SSM device would be ideal in this case, since it lists out all the information I might require ( https://sumo.dlr.de/docs/Simulation/Output/SSM_Device.html#encounter_types ). I am not able to figure out how to get this information dynamically though. Please advise.

Thank you.
Sincerely,
Hriday

_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
Reply | Threaded
Open this post in threaded view
|

Re: [sumo-user] SUMO vehicle context subscriptions

Jakob Erdmann
Hello,
the ssm device currently does not expose the conflict-related vehicles. Hower you could use

addSubscriptionFilterFieldOfVision to get all vehicles within a given range and angle
or
addSubscriptionFilterTurn which returns foe vehicles on and approaching upcoming junctions along the route of the ego vehicle.

regards,
Jakob

Am Di., 8. Dez. 2020 um 14:03 Uhr schrieb Hriday Sanghvi <[hidden email]>:
Hello,

I am a 2nd year PhD student at Trinity College Dublin, but I am new here.

I am trying to set a range on vehicles such that they detect the presence of any vehicle "X" metres in front of them. I am currently using a context subscription on each vehicle with a LaneFilter applied, setting downstreamDist to a value. ( https://sumo.dlr.de/daily/pydoc/traci._vehicle.html#VehicleDomain-addSubscriptionFilterLanes ). However, this does not seem to detect the vehicles "X" metres in a radial distance ( https://sumo.dlr.de/docs/TraCI/Interfacing_TraCI_from_Python.html#context_subscription_filters ) in the case where the vehicles meet each other at the intersection at a perpendicular angle.

It seems that using an SSM device would be ideal in this case, since it lists out all the information I might require ( https://sumo.dlr.de/docs/Simulation/Output/SSM_Device.html#encounter_types ). I am not able to figure out how to get this information dynamically though. Please advise.

Thank you.
Sincerely,
Hriday
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user

_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
Reply | Threaded
Open this post in threaded view
|

Re: [sumo-user] SUMO vehicle context subscriptions

Hriday Sanghvi
Hello Jakob,

Thank you for your response. I have tried using addSubscriptionFilterCFManeuver instead of addSubscriptionFilterFieldOfVision since the latter only mentioned an "angle" and not a range. I also tried using addSubscriptionFilterTurn.

I receive an empty result in my subscriptions after addSubscriptionFilterTurn and end up with a TraCI connection error. For addSubscriptionFilterCFManeuver, I also get an empty result in subscriptions unless I set an absurdly high downstreamDist value like 1000. With regard to that, I just wanted to clarify the following if possible:

1. Is the downstreamDist a radial range/distance measured in metres in the direction towards the route that the ego vehicle is following?
2. Is there any way to "highlight" the range/distance using sumo-gui so I can see what it will and will not detect?
3. I think it is possible to chain multiple filters line by line? - I tried it and there was no error as such, but I just need a confirmation on this? Does it add an additional filter or overwrite the existing filter you set?

Thank you.
Sincerely,
Hriday.

On Tue, 8 Dec 2020 at 16:19, Jakob Erdmann <[hidden email]> wrote:
Hello,
the ssm device currently does not expose the conflict-related vehicles. Hower you could use

addSubscriptionFilterFieldOfVision to get all vehicles within a given range and angle
or
addSubscriptionFilterTurn which returns foe vehicles on and approaching upcoming junctions along the route of the ego vehicle.

regards,
Jakob

Am Di., 8. Dez. 2020 um 14:03 Uhr schrieb Hriday Sanghvi <[hidden email]>:
Hello,

I am a 2nd year PhD student at Trinity College Dublin, but I am new here.

I am trying to set a range on vehicles such that they detect the presence of any vehicle "X" metres in front of them. I am currently using a context subscription on each vehicle with a LaneFilter applied, setting downstreamDist to a value. ( https://sumo.dlr.de/daily/pydoc/traci._vehicle.html#VehicleDomain-addSubscriptionFilterLanes ). However, this does not seem to detect the vehicles "X" metres in a radial distance ( https://sumo.dlr.de/docs/TraCI/Interfacing_TraCI_from_Python.html#context_subscription_filters ) in the case where the vehicles meet each other at the intersection at a perpendicular angle.

It seems that using an SSM device would be ideal in this case, since it lists out all the information I might require ( https://sumo.dlr.de/docs/Simulation/Output/SSM_Device.html#encounter_types ). I am not able to figure out how to get this information dynamically though. Please advise.

Thank you.
Sincerely,
Hriday
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user


--

_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
Reply | Threaded
Open this post in threaded view
|

Re: [sumo-user] SUMO vehicle context subscriptions

Jakob Erdmann
Hello,

addSubscriptionFilterFieldOfVision must be set directly after a call to vehicle.subscribeContext. It will use the range of that subscription and filter it by angle.

1) upstream and downstream dist are measured in m along the route of the vehicle
2) unfortunately, no.
3) Filters are meant to be combined so that each filter can further reduce the set of returned vehicles.

regards,
Jakob

Am Mi., 9. Dez. 2020 um 19:56 Uhr schrieb Hriday Sanghvi <[hidden email]>:
Hello Jakob,

Thank you for your response. I have tried using addSubscriptionFilterCFManeuver instead of addSubscriptionFilterFieldOfVision since the latter only mentioned an "angle" and not a range. I also tried using addSubscriptionFilterTurn.

I receive an empty result in my subscriptions after addSubscriptionFilterTurn and end up with a TraCI connection error. For addSubscriptionFilterCFManeuver, I also get an empty result in subscriptions unless I set an absurdly high downstreamDist value like 1000. With regard to that, I just wanted to clarify the following if possible:

1. Is the downstreamDist a radial range/distance measured in metres in the direction towards the route that the ego vehicle is following?
2. Is there any way to "highlight" the range/distance using sumo-gui so I can see what it will and will not detect?
3. I think it is possible to chain multiple filters line by line? - I tried it and there was no error as such, but I just need a confirmation on this? Does it add an additional filter or overwrite the existing filter you set?

Thank you.
Sincerely,
Hriday.

On Tue, 8 Dec 2020 at 16:19, Jakob Erdmann <[hidden email]> wrote:
Hello,
the ssm device currently does not expose the conflict-related vehicles. Hower you could use

addSubscriptionFilterFieldOfVision to get all vehicles within a given range and angle
or
addSubscriptionFilterTurn which returns foe vehicles on and approaching upcoming junctions along the route of the ego vehicle.

regards,
Jakob

Am Di., 8. Dez. 2020 um 14:03 Uhr schrieb Hriday Sanghvi <[hidden email]>:
Hello,

I am a 2nd year PhD student at Trinity College Dublin, but I am new here.

I am trying to set a range on vehicles such that they detect the presence of any vehicle "X" metres in front of them. I am currently using a context subscription on each vehicle with a LaneFilter applied, setting downstreamDist to a value. ( https://sumo.dlr.de/daily/pydoc/traci._vehicle.html#VehicleDomain-addSubscriptionFilterLanes ). However, this does not seem to detect the vehicles "X" metres in a radial distance ( https://sumo.dlr.de/docs/TraCI/Interfacing_TraCI_from_Python.html#context_subscription_filters ) in the case where the vehicles meet each other at the intersection at a perpendicular angle.

It seems that using an SSM device would be ideal in this case, since it lists out all the information I might require ( https://sumo.dlr.de/docs/Simulation/Output/SSM_Device.html#encounter_types ). I am not able to figure out how to get this information dynamically though. Please advise.

Thank you.
Sincerely,
Hriday
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user


--
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user

_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
Reply | Threaded
Open this post in threaded view
|

Re: [sumo-user] SUMO vehicle context subscriptions

Hriday Sanghvi
Hello Jakob,

Thank you so much for your reply! I am trying to use the traci constant DISTANCE_REQUEST in order to be able to verify the distance between two vehicles by air/driving but I need to be able to pass some parameters to it. From what I see in subscribeContext's function signature, I think it would be passed to the "parameters" argument as per the doc. How do I find out what data type/structure it is passed as though? (For example, as a dictionary?). Could you please point me to the right resource/link? I really appreciate your help and feedback!

Thank you.
Sincerely,
Hriday. 

On Thu, 10 Dec 2020 at 09:42, Jakob Erdmann <[hidden email]> wrote:
Hello,

addSubscriptionFilterFieldOfVision must be set directly after a call to vehicle.subscribeContext. It will use the range of that subscription and filter it by angle.

1) upstream and downstream dist are measured in m along the route of the vehicle
2) unfortunately, no.
3) Filters are meant to be combined so that each filter can further reduce the set of returned vehicles.

regards,
Jakob

Am Mi., 9. Dez. 2020 um 19:56 Uhr schrieb Hriday Sanghvi <[hidden email]>:
Hello Jakob,

Thank you for your response. I have tried using addSubscriptionFilterCFManeuver instead of addSubscriptionFilterFieldOfVision since the latter only mentioned an "angle" and not a range. I also tried using addSubscriptionFilterTurn.

I receive an empty result in my subscriptions after addSubscriptionFilterTurn and end up with a TraCI connection error. For addSubscriptionFilterCFManeuver, I also get an empty result in subscriptions unless I set an absurdly high downstreamDist value like 1000. With regard to that, I just wanted to clarify the following if possible:

1. Is the downstreamDist a radial range/distance measured in metres in the direction towards the route that the ego vehicle is following?
2. Is there any way to "highlight" the range/distance using sumo-gui so I can see what it will and will not detect?
3. I think it is possible to chain multiple filters line by line? - I tried it and there was no error as such, but I just need a confirmation on this? Does it add an additional filter or overwrite the existing filter you set?

Thank you.
Sincerely,
Hriday.

On Tue, 8 Dec 2020 at 16:19, Jakob Erdmann <[hidden email]> wrote:
Hello,
the ssm device currently does not expose the conflict-related vehicles. Hower you could use

addSubscriptionFilterFieldOfVision to get all vehicles within a given range and angle
or
addSubscriptionFilterTurn which returns foe vehicles on and approaching upcoming junctions along the route of the ego vehicle.

regards,
Jakob

Am Di., 8. Dez. 2020 um 14:03 Uhr schrieb Hriday Sanghvi <[hidden email]>:
Hello,

I am a 2nd year PhD student at Trinity College Dublin, but I am new here.

I am trying to set a range on vehicles such that they detect the presence of any vehicle "X" metres in front of them. I am currently using a context subscription on each vehicle with a LaneFilter applied, setting downstreamDist to a value. ( https://sumo.dlr.de/daily/pydoc/traci._vehicle.html#VehicleDomain-addSubscriptionFilterLanes ). However, this does not seem to detect the vehicles "X" metres in a radial distance ( https://sumo.dlr.de/docs/TraCI/Interfacing_TraCI_from_Python.html#context_subscription_filters ) in the case where the vehicles meet each other at the intersection at a perpendicular angle.

It seems that using an SSM device would be ideal in this case, since it lists out all the information I might require ( https://sumo.dlr.de/docs/Simulation/Output/SSM_Device.html#encounter_types ). I am not able to figure out how to get this information dynamically though. Please advise.

Thank you.
Sincerely,
Hriday
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user


--
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user


--

_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
Reply | Threaded
Open this post in threaded view
|

Re: [sumo-user] SUMO vehicle context subscriptions

Jakob Erdmann
Sorry, this isn't yet working (https://github.com/eclipse/sumo/issues/7648).
Subscribe to this issue to be noticed when it is implemented.

Am Do., 10. Dez. 2020 um 18:54 Uhr schrieb Hriday Sanghvi <[hidden email]>:
Hello Jakob,

Thank you so much for your reply! I am trying to use the traci constant DISTANCE_REQUEST in order to be able to verify the distance between two vehicles by air/driving but I need to be able to pass some parameters to it. From what I see in subscribeContext's function signature, I think it would be passed to the "parameters" argument as per the doc. How do I find out what data type/structure it is passed as though? (For example, as a dictionary?). Could you please point me to the right resource/link? I really appreciate your help and feedback!

Thank you.
Sincerely,
Hriday. 

On Thu, 10 Dec 2020 at 09:42, Jakob Erdmann <[hidden email]> wrote:
Hello,

addSubscriptionFilterFieldOfVision must be set directly after a call to vehicle.subscribeContext. It will use the range of that subscription and filter it by angle.

1) upstream and downstream dist are measured in m along the route of the vehicle
2) unfortunately, no.
3) Filters are meant to be combined so that each filter can further reduce the set of returned vehicles.

regards,
Jakob

Am Mi., 9. Dez. 2020 um 19:56 Uhr schrieb Hriday Sanghvi <[hidden email]>:
Hello Jakob,

Thank you for your response. I have tried using addSubscriptionFilterCFManeuver instead of addSubscriptionFilterFieldOfVision since the latter only mentioned an "angle" and not a range. I also tried using addSubscriptionFilterTurn.

I receive an empty result in my subscriptions after addSubscriptionFilterTurn and end up with a TraCI connection error. For addSubscriptionFilterCFManeuver, I also get an empty result in subscriptions unless I set an absurdly high downstreamDist value like 1000. With regard to that, I just wanted to clarify the following if possible:

1. Is the downstreamDist a radial range/distance measured in metres in the direction towards the route that the ego vehicle is following?
2. Is there any way to "highlight" the range/distance using sumo-gui so I can see what it will and will not detect?
3. I think it is possible to chain multiple filters line by line? - I tried it and there was no error as such, but I just need a confirmation on this? Does it add an additional filter or overwrite the existing filter you set?

Thank you.
Sincerely,
Hriday.

On Tue, 8 Dec 2020 at 16:19, Jakob Erdmann <[hidden email]> wrote:
Hello,
the ssm device currently does not expose the conflict-related vehicles. Hower you could use

addSubscriptionFilterFieldOfVision to get all vehicles within a given range and angle
or
addSubscriptionFilterTurn which returns foe vehicles on and approaching upcoming junctions along the route of the ego vehicle.

regards,
Jakob

Am Di., 8. Dez. 2020 um 14:03 Uhr schrieb Hriday Sanghvi <[hidden email]>:
Hello,

I am a 2nd year PhD student at Trinity College Dublin, but I am new here.

I am trying to set a range on vehicles such that they detect the presence of any vehicle "X" metres in front of them. I am currently using a context subscription on each vehicle with a LaneFilter applied, setting downstreamDist to a value. ( https://sumo.dlr.de/daily/pydoc/traci._vehicle.html#VehicleDomain-addSubscriptionFilterLanes ). However, this does not seem to detect the vehicles "X" metres in a radial distance ( https://sumo.dlr.de/docs/TraCI/Interfacing_TraCI_from_Python.html#context_subscription_filters ) in the case where the vehicles meet each other at the intersection at a perpendicular angle.

It seems that using an SSM device would be ideal in this case, since it lists out all the information I might require ( https://sumo.dlr.de/docs/Simulation/Output/SSM_Device.html#encounter_types ). I am not able to figure out how to get this information dynamically though. Please advise.

Thank you.
Sincerely,
Hriday
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user


--
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user


--
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user

_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
Reply | Threaded
Open this post in threaded view
|

Re: [sumo-user] SUMO vehicle context subscriptions

Hriday Sanghvi
Hello Jakob, thank you for the update. I was actually trying to figure out which car is in the "front" and which car is in the "back" during a collision, since I need to manipulate the speeds based on that. What I am doing in the case where the vehicles collide when they are on the same lane, is using lane position to figure out the ordering. But for cases where the cars collide while they are on different edges (and hence different lanes), I have still not come up with a workaround. Tried using addSubscriptionFilterLeadFollow but it did not detect any of the vehicles. Any suggestions?

Thank you.

Sincerely,
Hriday.

On Sat, 12 Dec 2020 at 16:44, Jakob Erdmann <[hidden email]> wrote:
Sorry, this isn't yet working (https://github.com/eclipse/sumo/issues/7648).
Subscribe to this issue to be noticed when it is implemented.

Am Do., 10. Dez. 2020 um 18:54 Uhr schrieb Hriday Sanghvi <[hidden email]>:
Hello Jakob,

Thank you so much for your reply! I am trying to use the traci constant DISTANCE_REQUEST in order to be able to verify the distance between two vehicles by air/driving but I need to be able to pass some parameters to it. From what I see in subscribeContext's function signature, I think it would be passed to the "parameters" argument as per the doc. How do I find out what data type/structure it is passed as though? (For example, as a dictionary?). Could you please point me to the right resource/link? I really appreciate your help and feedback!

Thank you.
Sincerely,
Hriday. 

On Thu, 10 Dec 2020 at 09:42, Jakob Erdmann <[hidden email]> wrote:
Hello,

addSubscriptionFilterFieldOfVision must be set directly after a call to vehicle.subscribeContext. It will use the range of that subscription and filter it by angle.

1) upstream and downstream dist are measured in m along the route of the vehicle
2) unfortunately, no.
3) Filters are meant to be combined so that each filter can further reduce the set of returned vehicles.

regards,
Jakob

Am Mi., 9. Dez. 2020 um 19:56 Uhr schrieb Hriday Sanghvi <[hidden email]>:
Hello Jakob,

Thank you for your response. I have tried using addSubscriptionFilterCFManeuver instead of addSubscriptionFilterFieldOfVision since the latter only mentioned an "angle" and not a range. I also tried using addSubscriptionFilterTurn.

I receive an empty result in my subscriptions after addSubscriptionFilterTurn and end up with a TraCI connection error. For addSubscriptionFilterCFManeuver, I also get an empty result in subscriptions unless I set an absurdly high downstreamDist value like 1000. With regard to that, I just wanted to clarify the following if possible:

1. Is the downstreamDist a radial range/distance measured in metres in the direction towards the route that the ego vehicle is following?
2. Is there any way to "highlight" the range/distance using sumo-gui so I can see what it will and will not detect?
3. I think it is possible to chain multiple filters line by line? - I tried it and there was no error as such, but I just need a confirmation on this? Does it add an additional filter or overwrite the existing filter you set?

Thank you.
Sincerely,
Hriday.

On Tue, 8 Dec 2020 at 16:19, Jakob Erdmann <[hidden email]> wrote:
Hello,
the ssm device currently does not expose the conflict-related vehicles. Hower you could use

addSubscriptionFilterFieldOfVision to get all vehicles within a given range and angle
or
addSubscriptionFilterTurn which returns foe vehicles on and approaching upcoming junctions along the route of the ego vehicle.

regards,
Jakob

Am Di., 8. Dez. 2020 um 14:03 Uhr schrieb Hriday Sanghvi <[hidden email]>:
Hello,

I am a 2nd year PhD student at Trinity College Dublin, but I am new here.

I am trying to set a range on vehicles such that they detect the presence of any vehicle "X" metres in front of them. I am currently using a context subscription on each vehicle with a LaneFilter applied, setting downstreamDist to a value. ( https://sumo.dlr.de/daily/pydoc/traci._vehicle.html#VehicleDomain-addSubscriptionFilterLanes ). However, this does not seem to detect the vehicles "X" metres in a radial distance ( https://sumo.dlr.de/docs/TraCI/Interfacing_TraCI_from_Python.html#context_subscription_filters ) in the case where the vehicles meet each other at the intersection at a perpendicular angle.

It seems that using an SSM device would be ideal in this case, since it lists out all the information I might require ( https://sumo.dlr.de/docs/Simulation/Output/SSM_Device.html#encounter_types ). I am not able to figure out how to get this information dynamically though. Please advise.

Thank you.
Sincerely,
Hriday
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user


--
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user


--
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user


--

_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
Reply | Threaded
Open this post in threaded view
|

Re: [sumo-user] SUMO vehicle context subscriptions

Jakob Erdmann
You can use vehicle.getLeader and vehicle.subscribeLeader.

Am So., 13. Dez. 2020 um 19:30 Uhr schrieb Hriday Sanghvi <[hidden email]>:
Hello Jakob, thank you for the update. I was actually trying to figure out which car is in the "front" and which car is in the "back" during a collision, since I need to manipulate the speeds based on that. What I am doing in the case where the vehicles collide when they are on the same lane, is using lane position to figure out the ordering. But for cases where the cars collide while they are on different edges (and hence different lanes), I have still not come up with a workaround. Tried using addSubscriptionFilterLeadFollow but it did not detect any of the vehicles. Any suggestions?

Thank you.

Sincerely,
Hriday.

On Sat, 12 Dec 2020 at 16:44, Jakob Erdmann <[hidden email]> wrote:
Sorry, this isn't yet working (https://github.com/eclipse/sumo/issues/7648).
Subscribe to this issue to be noticed when it is implemented.

Am Do., 10. Dez. 2020 um 18:54 Uhr schrieb Hriday Sanghvi <[hidden email]>:
Hello Jakob,

Thank you so much for your reply! I am trying to use the traci constant DISTANCE_REQUEST in order to be able to verify the distance between two vehicles by air/driving but I need to be able to pass some parameters to it. From what I see in subscribeContext's function signature, I think it would be passed to the "parameters" argument as per the doc. How do I find out what data type/structure it is passed as though? (For example, as a dictionary?). Could you please point me to the right resource/link? I really appreciate your help and feedback!

Thank you.
Sincerely,
Hriday. 

On Thu, 10 Dec 2020 at 09:42, Jakob Erdmann <[hidden email]> wrote:
Hello,

addSubscriptionFilterFieldOfVision must be set directly after a call to vehicle.subscribeContext. It will use the range of that subscription and filter it by angle.

1) upstream and downstream dist are measured in m along the route of the vehicle
2) unfortunately, no.
3) Filters are meant to be combined so that each filter can further reduce the set of returned vehicles.

regards,
Jakob

Am Mi., 9. Dez. 2020 um 19:56 Uhr schrieb Hriday Sanghvi <[hidden email]>:
Hello Jakob,

Thank you for your response. I have tried using addSubscriptionFilterCFManeuver instead of addSubscriptionFilterFieldOfVision since the latter only mentioned an "angle" and not a range. I also tried using addSubscriptionFilterTurn.

I receive an empty result in my subscriptions after addSubscriptionFilterTurn and end up with a TraCI connection error. For addSubscriptionFilterCFManeuver, I also get an empty result in subscriptions unless I set an absurdly high downstreamDist value like 1000. With regard to that, I just wanted to clarify the following if possible:

1. Is the downstreamDist a radial range/distance measured in metres in the direction towards the route that the ego vehicle is following?
2. Is there any way to "highlight" the range/distance using sumo-gui so I can see what it will and will not detect?
3. I think it is possible to chain multiple filters line by line? - I tried it and there was no error as such, but I just need a confirmation on this? Does it add an additional filter or overwrite the existing filter you set?

Thank you.
Sincerely,
Hriday.

On Tue, 8 Dec 2020 at 16:19, Jakob Erdmann <[hidden email]> wrote:
Hello,
the ssm device currently does not expose the conflict-related vehicles. Hower you could use

addSubscriptionFilterFieldOfVision to get all vehicles within a given range and angle
or
addSubscriptionFilterTurn which returns foe vehicles on and approaching upcoming junctions along the route of the ego vehicle.

regards,
Jakob

Am Di., 8. Dez. 2020 um 14:03 Uhr schrieb Hriday Sanghvi <[hidden email]>:
Hello,

I am a 2nd year PhD student at Trinity College Dublin, but I am new here.

I am trying to set a range on vehicles such that they detect the presence of any vehicle "X" metres in front of them. I am currently using a context subscription on each vehicle with a LaneFilter applied, setting downstreamDist to a value. ( https://sumo.dlr.de/daily/pydoc/traci._vehicle.html#VehicleDomain-addSubscriptionFilterLanes ). However, this does not seem to detect the vehicles "X" metres in a radial distance ( https://sumo.dlr.de/docs/TraCI/Interfacing_TraCI_from_Python.html#context_subscription_filters ) in the case where the vehicles meet each other at the intersection at a perpendicular angle.

It seems that using an SSM device would be ideal in this case, since it lists out all the information I might require ( https://sumo.dlr.de/docs/Simulation/Output/SSM_Device.html#encounter_types ). I am not able to figure out how to get this information dynamically though. Please advise.

Thank you.
Sincerely,
Hriday
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user


--
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user


--
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user


--
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user

_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
Reply | Threaded
Open this post in threaded view
|

Re: [sumo-user] SUMO vehicle context subscriptions

Hriday Sanghvi
Hello Jakob,

Thank you for your reply. I was able to use subscribe Leader to get the required information. My only question is regarding the "dist" parameter which I read about here. It states that 
The dist parameter defines the minimum lookahead, 0 calculates a lookahead from the brake gap.
1. Is the brake gap mentioned here the same as minGap parameter?

Note that the returned leader may be further away than the given dist and that the vehicle will only look on its current best lanes and not look beyond the end of its final route edge.
2. I'm not sure what kind of behaviour this would entail. When they say that the returned leader may be further away than the given dist - what are the cases when this happens? Is there any way to control it?

Thank you for your help.

Sincerely,
Hriday. 

On Sun, 13 Dec 2020 at 22:18, Jakob Erdmann <[hidden email]> wrote:
You can use vehicle.getLeader and vehicle.subscribeLeader.

Am So., 13. Dez. 2020 um 19:30 Uhr schrieb Hriday Sanghvi <[hidden email]>:
Hello Jakob, thank you for the update. I was actually trying to figure out which car is in the "front" and which car is in the "back" during a collision, since I need to manipulate the speeds based on that. What I am doing in the case where the vehicles collide when they are on the same lane, is using lane position to figure out the ordering. But for cases where the cars collide while they are on different edges (and hence different lanes), I have still not come up with a workaround. Tried using addSubscriptionFilterLeadFollow but it did not detect any of the vehicles. Any suggestions?

Thank you.

Sincerely,
Hriday.

On Sat, 12 Dec 2020 at 16:44, Jakob Erdmann <[hidden email]> wrote:
Sorry, this isn't yet working (https://github.com/eclipse/sumo/issues/7648).
Subscribe to this issue to be noticed when it is implemented.

Am Do., 10. Dez. 2020 um 18:54 Uhr schrieb Hriday Sanghvi <[hidden email]>:
Hello Jakob,

Thank you so much for your reply! I am trying to use the traci constant DISTANCE_REQUEST in order to be able to verify the distance between two vehicles by air/driving but I need to be able to pass some parameters to it. From what I see in subscribeContext's function signature, I think it would be passed to the "parameters" argument as per the doc. How do I find out what data type/structure it is passed as though? (For example, as a dictionary?). Could you please point me to the right resource/link? I really appreciate your help and feedback!

Thank you.
Sincerely,
Hriday. 

On Thu, 10 Dec 2020 at 09:42, Jakob Erdmann <[hidden email]> wrote:
Hello,

addSubscriptionFilterFieldOfVision must be set directly after a call to vehicle.subscribeContext. It will use the range of that subscription and filter it by angle.

1) upstream and downstream dist are measured in m along the route of the vehicle
2) unfortunately, no.
3) Filters are meant to be combined so that each filter can further reduce the set of returned vehicles.

regards,
Jakob

Am Mi., 9. Dez. 2020 um 19:56 Uhr schrieb Hriday Sanghvi <[hidden email]>:
Hello Jakob,

Thank you for your response. I have tried using addSubscriptionFilterCFManeuver instead of addSubscriptionFilterFieldOfVision since the latter only mentioned an "angle" and not a range. I also tried using addSubscriptionFilterTurn.

I receive an empty result in my subscriptions after addSubscriptionFilterTurn and end up with a TraCI connection error. For addSubscriptionFilterCFManeuver, I also get an empty result in subscriptions unless I set an absurdly high downstreamDist value like 1000. With regard to that, I just wanted to clarify the following if possible:

1. Is the downstreamDist a radial range/distance measured in metres in the direction towards the route that the ego vehicle is following?
2. Is there any way to "highlight" the range/distance using sumo-gui so I can see what it will and will not detect?
3. I think it is possible to chain multiple filters line by line? - I tried it and there was no error as such, but I just need a confirmation on this? Does it add an additional filter or overwrite the existing filter you set?

Thank you.
Sincerely,
Hriday.

On Tue, 8 Dec 2020 at 16:19, Jakob Erdmann <[hidden email]> wrote:
Hello,
the ssm device currently does not expose the conflict-related vehicles. Hower you could use

addSubscriptionFilterFieldOfVision to get all vehicles within a given range and angle
or
addSubscriptionFilterTurn which returns foe vehicles on and approaching upcoming junctions along the route of the ego vehicle.

regards,
Jakob

Am Di., 8. Dez. 2020 um 14:03 Uhr schrieb Hriday Sanghvi <[hidden email]>:
Hello,

I am a 2nd year PhD student at Trinity College Dublin, but I am new here.

I am trying to set a range on vehicles such that they detect the presence of any vehicle "X" metres in front of them. I am currently using a context subscription on each vehicle with a LaneFilter applied, setting downstreamDist to a value. ( https://sumo.dlr.de/daily/pydoc/traci._vehicle.html#VehicleDomain-addSubscriptionFilterLanes ). However, this does not seem to detect the vehicles "X" metres in a radial distance ( https://sumo.dlr.de/docs/TraCI/Interfacing_TraCI_from_Python.html#context_subscription_filters ) in the case where the vehicles meet each other at the intersection at a perpendicular angle.

It seems that using an SSM device would be ideal in this case, since it lists out all the information I might require ( https://sumo.dlr.de/docs/Simulation/Output/SSM_Device.html#encounter_types ). I am not able to figure out how to get this information dynamically though. Please advise.

Thank you.
Sincerely,
Hriday
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user


--
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user


--
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user


--
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user


--

_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
Reply | Threaded
Open this post in threaded view
|

Re: [sumo-user] SUMO vehicle context subscriptions

Jakob Erdmann
1). No. This is the estimated brake gap at the current vehicle speed (vehicles within this distance are safety-critical). See also traci.vehicle.
2). The function returns the leader *and* the actual gap so you have full control over the leader vehicles you wish to consider. Basically, dist is only a labor-saving parameter to avoid searching too far.

regards,
Jakob

Am Mo., 4. Jan. 2021 um 11:05 Uhr schrieb Hriday Sanghvi <[hidden email]>:
Hello Jakob,

Thank you for your reply. I was able to use subscribe Leader to get the required information. My only question is regarding the "dist" parameter which I read about here. It states that 
The dist parameter defines the minimum lookahead, 0 calculates a lookahead from the brake gap.
1. Is the brake gap mentioned here the same as minGap parameter?

Note that the returned leader may be further away than the given dist and that the vehicle will only look on its current best lanes and not look beyond the end of its final route edge.
2. I'm not sure what kind of behaviour this would entail. When they say that the returned leader may be further away than the given dist - what are the cases when this happens? Is there any way to control it?

Thank you for your help.

Sincerely,
Hriday. 

On Sun, 13 Dec 2020 at 22:18, Jakob Erdmann <[hidden email]> wrote:
You can use vehicle.getLeader and vehicle.subscribeLeader.

Am So., 13. Dez. 2020 um 19:30 Uhr schrieb Hriday Sanghvi <[hidden email]>:
Hello Jakob, thank you for the update. I was actually trying to figure out which car is in the "front" and which car is in the "back" during a collision, since I need to manipulate the speeds based on that. What I am doing in the case where the vehicles collide when they are on the same lane, is using lane position to figure out the ordering. But for cases where the cars collide while they are on different edges (and hence different lanes), I have still not come up with a workaround. Tried using addSubscriptionFilterLeadFollow but it did not detect any of the vehicles. Any suggestions?

Thank you.

Sincerely,
Hriday.

On Sat, 12 Dec 2020 at 16:44, Jakob Erdmann <[hidden email]> wrote:
Sorry, this isn't yet working (https://github.com/eclipse/sumo/issues/7648).
Subscribe to this issue to be noticed when it is implemented.

Am Do., 10. Dez. 2020 um 18:54 Uhr schrieb Hriday Sanghvi <[hidden email]>:
Hello Jakob,

Thank you so much for your reply! I am trying to use the traci constant DISTANCE_REQUEST in order to be able to verify the distance between two vehicles by air/driving but I need to be able to pass some parameters to it. From what I see in subscribeContext's function signature, I think it would be passed to the "parameters" argument as per the doc. How do I find out what data type/structure it is passed as though? (For example, as a dictionary?). Could you please point me to the right resource/link? I really appreciate your help and feedback!

Thank you.
Sincerely,
Hriday. 

On Thu, 10 Dec 2020 at 09:42, Jakob Erdmann <[hidden email]> wrote:
Hello,

addSubscriptionFilterFieldOfVision must be set directly after a call to vehicle.subscribeContext. It will use the range of that subscription and filter it by angle.

1) upstream and downstream dist are measured in m along the route of the vehicle
2) unfortunately, no.
3) Filters are meant to be combined so that each filter can further reduce the set of returned vehicles.

regards,
Jakob

Am Mi., 9. Dez. 2020 um 19:56 Uhr schrieb Hriday Sanghvi <[hidden email]>:
Hello Jakob,

Thank you for your response. I have tried using addSubscriptionFilterCFManeuver instead of addSubscriptionFilterFieldOfVision since the latter only mentioned an "angle" and not a range. I also tried using addSubscriptionFilterTurn.

I receive an empty result in my subscriptions after addSubscriptionFilterTurn and end up with a TraCI connection error. For addSubscriptionFilterCFManeuver, I also get an empty result in subscriptions unless I set an absurdly high downstreamDist value like 1000. With regard to that, I just wanted to clarify the following if possible:

1. Is the downstreamDist a radial range/distance measured in metres in the direction towards the route that the ego vehicle is following?
2. Is there any way to "highlight" the range/distance using sumo-gui so I can see what it will and will not detect?
3. I think it is possible to chain multiple filters line by line? - I tried it and there was no error as such, but I just need a confirmation on this? Does it add an additional filter or overwrite the existing filter you set?

Thank you.
Sincerely,
Hriday.

On Tue, 8 Dec 2020 at 16:19, Jakob Erdmann <[hidden email]> wrote:
Hello,
the ssm device currently does not expose the conflict-related vehicles. Hower you could use

addSubscriptionFilterFieldOfVision to get all vehicles within a given range and angle
or
addSubscriptionFilterTurn which returns foe vehicles on and approaching upcoming junctions along the route of the ego vehicle.

regards,
Jakob

Am Di., 8. Dez. 2020 um 14:03 Uhr schrieb Hriday Sanghvi <[hidden email]>:
Hello,

I am a 2nd year PhD student at Trinity College Dublin, but I am new here.

I am trying to set a range on vehicles such that they detect the presence of any vehicle "X" metres in front of them. I am currently using a context subscription on each vehicle with a LaneFilter applied, setting downstreamDist to a value. ( https://sumo.dlr.de/daily/pydoc/traci._vehicle.html#VehicleDomain-addSubscriptionFilterLanes ). However, this does not seem to detect the vehicles "X" metres in a radial distance ( https://sumo.dlr.de/docs/TraCI/Interfacing_TraCI_from_Python.html#context_subscription_filters ) in the case where the vehicles meet each other at the intersection at a perpendicular angle.

It seems that using an SSM device would be ideal in this case, since it lists out all the information I might require ( https://sumo.dlr.de/docs/Simulation/Output/SSM_Device.html#encounter_types ). I am not able to figure out how to get this information dynamically though. Please advise.

Thank you.
Sincerely,
Hriday
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user


--
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user


--
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user


--
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user


--
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user

_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user