Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[sumo-user] Problem with traci4matlab vehicle subscription filters

Hello all,

I have a problem with traci4matlab vehicle subscription filters. I have
subscribed to a vehicle to obtain the traffic object's position and
orientation data. I want to filter the subscription results by specifying
upstream and downstream distance. But the filter does not seem to work as it
is not filtering out the traffic objects beyond the specified distance. Here
is the code:

traci.vehicle.subscribeContext('1001',constants.CMD_GET_VEHICLE_VARIABLE,400,{constants.VAR_POSITION3D,constants.VAR_ANGLE});
traci.vehicle.addSubscriptionFilterDownstreamDistance(100);
traci.vehicle.addSubscriptionFilterUpstreamDistance(50);
results=traci.vehicle.getContextSubscriptionResults('1001'); 

I also tried the addSubscriptionFilterLanes filter to certain lanes along
with upstream and downstream distances. But this seem to not work as well.
Here is the code:

traci.vehicle.subscribeContext('1001',constants.CMD_GET_VEHICLE_VARIABLE,400,{constants.VAR_POSITION3D,constants.VAR_ANGLE});
traci.vehicle.addSubscriptionFilterLanes([-1,0],1,100,50);
results=traci.vehicle.getContextSubscriptionResults('1001');

I am not sure if this is occurring because of wrong syntax or because of
some other issue. I would really appreciate any help in this regard.

My Sumo version is 1.7.0 and TraCI version is 20.

Thank you and regards,
Shreevatsa



--
Sent from: http://sumo-user-mailing-list.90755.n8.nabble.com/


Back to the top