Hi,

thanks for your help.
I managed to add the setStop command with the parking flag in the style of 
existing commands and apparently it is working.

If somebody is interested, here is my code:

void MyCustomTraCIScenarioManager::setStop(std::string nodeId, std::string 
roadId, double pos, uint8_t laneId, double waittime, uint8_t flags){
    uint8_t variableId = CMD_STOP;
    uint8_t variableType = TYPE_COMPOUND;
    int32_t count = 5;
    uint8_t edgeIdT = TYPE_STRING;
    std::string edgeId = roadId;
    uint8_t stopPosT = TYPE_DOUBLE;
    double stopPos = pos;
    uint8_t stopLaneT = TYPE_BYTE;
    uint8_t stopLane = laneId;
    uint8_t durationT = TYPE_INTEGER;
    uint32_t duration = waittime * 1000;
    uint8_t flagsT = TYPE_BYTE;

    TraCIBuffer buf = connection->query(CMD_SET_VEHICLE_VARIABLE,
                                                TraCIBuffer()
                                                << variableId
                                                << nodeId
                                                << variableType
                                                << count
                                                << edgeIdT
                                                << edgeId
                                                << stopPosT
                                                << stopPos
                                                << stopLaneT
                                                << stopLane
                                                << durationT
                                                << duration
                                                << flagsT
                                                << flags
                                                );
    ASSERT(buf.eof());
}
-- 
Regards,
Florian

On 13 Jun 2015 at 11:28:23, Jakob Erdmann ([email protected]) wrote:

The setStop command already existed in TraCI Version 7 but the parking flag was 
only added at version 8. You will have to approach the Veins developers 
regarding support for this feature.
regards,
Jakob

2015-06-10 15:20 GMT+02:00 Florian Franke <[email protected]>:
Hello,

I built a simple SUMO-scenario in which a vehicle parks off-street without 
blocking the lane.
The vehicle's route-definition in my *.rou.xml file contains a stop:
        <route edges="f1top1 p1top2 p2tof2 f2tof3">
                <stop lane="p1top2_0" endPos="10" duration="20" parking="true" 
/>
        </route>

Now, my goal is to let Veins assign appropriate TraCI commands to a specific 
vehicle in order to perform such an off-street parking.

I found the command "stopAt" in 
src/veins/modules/mobility/traci/TraCICommandInterface.h, but the vehicle 
blocks the specified lane.
SUMO's TraCI-command "stop" 
(http://sumo.dlr.de/wiki/TraCI/Change_Vehicle_State) accepts stop-flags and I 
think this command is suitable for off-street parking.
In $SUMO_HOME/tools/trac/vehicle.py I found the "setStop” method for Python.
But I did not find the command in TraCICommandInterface.h. Is it not yet 
implemented ("$SUMO_HOME/tools/traci/constants.py" says TRACI_VERSION = 8, but 
"src/veins/modules/mobility/traci/TraCIConstants.h" says TRACI_VERSION 7)?

So my questions are:
1. Is "setStop" the correct command for off-street parking?
2. If so, how can I send this command using Veins?

I am using Veins 4 alpha 2 and SUMO 0.22.0.

Regards, Florian
------------------------------------------------------------------------------
_______________________________________________
sumo-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sumo-user

------------------------------------------------------------------------------
_______________________________________________
sumo-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sumo-user

Reply via email to