[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [sumo-user] Field of vision filter for context subscription
|
Sorry. That isn't supported at the moment. Your best solution would probably to use the full circle and then do your own filtering in post processioning.
Hello,
I have a question related to this item of field of vision. Currently, the opening angle is oriented in alignment with the vehicle headway. Is it possible to set multiple opening angles for the same vehicle and oriented according to different axes (front, left, right and behind)?
Best regards,
Hello Jakob
Thank you for your reply and availability. I keep this
procedure for future issues. Indeed I tried the code below and the
filter is working successfully:
subscribed = False
if subscribed:
for
v in
sorted(traci.vehicle.getContextSubscriptionResults(str(rl_id))
or []):
near1.add(v)
if not subscribed:
traci.vehicle.subscribeContext(str(rl_id),
traci.constants.CMD_GET_VEHICLE_VARIABLE, 50, [traci.constants.VAR_POSITION])
traci.vehicle.addSubscriptionFilterFieldOfVision(90)
subscribed = True
Best
regards,
Hello Jakob,
I tried other filters addSubscriptionFilterUpstreamDistance and addSubscriptionFilterDownstreamDistance. Similarly there is no update on the initial context.
The filters are not working but there are no errors in the execution and I have the correct radius range.
Did I miss something?
Thank you in advance.
Hello,
Here attached a doc with the 2 screenshots: Sumo Gui and results.
Best regards,
the image attachments are missing
Hello Jakob
Thank
you for the reply. I’m using the right methods.
traci.subscribeContext(str(rl_id),
tc.CMD_GET_VEHICLE_VARIABLE , 50, [tc.VAR_SPEED, tc.VAR_POSITION])
traci.addSubscriptionFilterFieldOfVision(10)
print(self.k.vehicle.getContextSubscriptionResults(str(rl_id))
Below
an invalid example, rl_id is the red car (rl_0):
![image.png]()
In both cases (with or without addSubscriptionFilterFieldOfVision(10) function) I have the same result:
![image.png]()
Shouldn’t sumo at least ignore the exo vehicles behind the ego ?
the methods are called
subscribeContext rather than subscribe_context and
addSubscriptionFilterFieldOfVision rather than add_filter_field_vision
I can confirm that the fieldOfVision filter is used with an opening angle in degrees and that it affects the context subscription results in our tests as expected.
If you can provide a minimal reproducable example of invalid filter results I will take a look.
Hello,
I am using context subscription to limit the ego vehicle perception. The application looks fine and I assume that the defined zone is a circular area which center is the ego and radius is the indicated distance argument. I tried to apply a field of vision filter, unfortunately it’s not working. I indicated different opening angles (from 5 to 180), however, the returned result is always the subscription context initial range. I think that the angle would have delimited an area from the circular zone in front of the vehicle. Could you please confirm and check if I set something wrong in the script below.
traci.vehicle.subscribe_context(str(rl_id), tc.CMD_GET_VEHICLE_VARIABLE , 50 , [tc.VAR_SPEED, tc.VAR_POSITION])
traci.vehicle.add_filter_field_vision(40)
print(traci.vehicle.get_context_subscription_results(str(rl_id)))
Regards,
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user