Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[sumo-user] Ovetaking via TraCI

Hello everyone!
I'm developing a Veins application to control the overtaking maneuver of vehicles in a road with 2 single lane with opposite direction routes (please take a look in attached overtaking.net.xml and overtaking.rou.xml files). I'm using latest development version of sumo and Veins 5.0-alpha2.

image.png

To control the overtaking maneuver I need to use the TraCI command interface. But I'm not able to trigger the overtaking via TraCI. I tried to use TraCICommandInterface changeRoute() but it does not work. I created a function to use move to command but it doesn't work either. Is there any way to trigger the overtaking maneuver performed by Sumo or send all individual steps via TraCI (move to opposite lane, accelerate and move to right lane again)? I am aware of the details of the overtaking maneuver listed here: https://sumo.dlr.de/wiki/Simulation/OppositeDirectionDriving#Opposite-Direction-Driving 

Thanks in advance!

--
Att.
Tiago Alves Silva
<routes>
	
	<vType id='vehicleType_1' maxSpeed='50' departSpeed='max' accel='10' decel='10' length='4' minGap='1' lcOpposite='0' laneChangeModel='LC2013' carFollowModel = 'Krauss'/>
	<vType id='vehicleType_2' maxSpeed='5' accel='5' decel='5' length='4' minGap='1' lcOpposite='0' laneChangeModel='LC2013' carFollowModel = 'Krauss'/>

	<flow id='flow_lToR' color="0,1,0" begin='0' end='4500' probability='0.08' type='vehicleType_1'>
		<route edges='lToR'/>
	</flow>

	<flow id='flow_rToL' color="0,0,1" begin='0' end='4500' period='3' type='vehicleType_1'>
		<route edges='rToL'/>
	</flow>

	<flow id='flow_rToL_Overtaking' color="1,0,0" begin='0' end='4500' probability='0.1' type='vehicleType_2'>
		<route edges='rToL'/>
	</flow>

</routes>
<?xml version="1.0" encoding="UTF-8"?>

<!-- generated on Mon 10 Jun 2019 12:18:46 PM -03 by Netedit Version 0.30.0
<?xml version="1.0" encoding="UTF-8"?>

<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/netconvertConfiguration.xsd";>

    <input>
        <sumo-net-file value="/home/veins/Documents/Ultrapassagens/Teste/Overtaking.net.xml"/>
    </input>

    <output>
        <output-file value="/home/veins/Documents/Ultrapassagens/Teste/Overtaking.net.xml"/>
    </output>

    <processing>
        <no-internal-links value="true"/>
        <no-turnarounds value="true"/>
        <offset.disable-normalization value="true"/>
        <lefthand value="false"/>
        <junctions.corner-detail value="0"/>
        <rectangular-lane-cut value="false"/>
    </processing>

</configuration>
-->

<net version="0.27" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/net_file.xsd";>

    <location netOffset="0.00,0.00" convBoundary="0.00,0.00,300.00,0.00" origBoundary="-10000000000.00,-10000000000.00,10000000000.00,10000000000.00" projParameter="!"/>

    <edge id="lToR" from="origemL" to="origemR" priority="1" length="300.00">
        <lane id="lToR_0" index="0" speed="50.00" length="300.00" shape="0.00,-1.65 300.00,-1.65"/>
        <neigh lane="rToL_0"/>
    </edge>
    <edge id="rToL" from="origemR" to="origemL" priority="1" length="300.00">
        <lane id="rToL_0" index="0" speed="50.00" length="300.00" shape="300.00,1.65 0.00,1.65"/>
        <neigh lane="lToR_0"/>
    </edge>

    <junction id="origemL" type="dead_end" x="0.00" y="0.00" incLanes="rToL_0" intLanes="" shape="0.00,-0.05 0.00,3.25 0.00,0.05"/>
    <junction id="origemR" type="dead_end" x="300.00" y="0.00" incLanes="lToR_0" intLanes="" shape="300.00,0.05 300.00,-3.25 300.00,-0.05"/>

</net>

Back to the top