Veins 如何让相扑中的车辆相撞?
我想在相扑中发出碰撞警告和紧急刹车,但我发现我无法让两辆车在相扑中相撞。那我该怎么做才能让两辆车在相扑中相撞呢 冲突.net.xmlVeins 如何让相扑中的车辆相撞?,veins,sumo,Veins,Sumo,我想在相扑中发出碰撞警告和紧急刹车,但我发现我无法让两辆车在相扑中相撞。那我该怎么做才能让两辆车在相扑中相撞呢 冲突.net.xml <net version="1.3" junctionCornerDetail="5" limitTurnSpeed="5.50"> <location netOffset="0.00,0.00" convBoundary="-300.00,
<net version="1.3" junctionCornerDetail="5" limitTurnSpeed="5.50">
<location netOffset="0.00,0.00" convBoundary="-300.00,0.00,300.00,0.00" origBoundary="10000000000.00,10000000000.00,-10000000000.00,-10000000000.00" projParameter="!"/>
<edge id=":gneJ1_0" function="internal">
<lane id=":gneJ1_0_0" index="0" speed=" 30" length="0.10" shape="0.00,-1.60 0.00,-1.60"/>
</edge>
<edge id="gneE0" from="gneJ0" to="gneJ1" priority="-1">
<lane id="gneE0_0" index="0" speed=" 30" length="300.00" shape="-300.00,-1.60 0.00,-1.60"/>
</edge>
<edge id="gneE1" from="gneJ1" to="gneJ2" priority="-1">
<lane id="gneE1_0" index="0" speed=" 30" length="300.00" shape="0.00,-1.60 300.00,-1.60"/>
</edge>
<junction id="gneJ0" type="dead_end" x="-300.00" y="0.00" incLanes="" intLanes="" shape="-300.00,0.00 -300.00,-3.20"/>
<junction id="gneJ1" type="priority" x="0.00" y="0.00" incLanes="gneE0_0" intLanes=":gneJ1_0_0" shape="0.00,0.00 0.00,-3.20 0.00,0.00">
<request index="0" response="0" foes="0" cont="0"/>
</junction>
<junction id="gneJ2" type="dead_end" x="300.00" y="0.00" incLanes="gneE1_0" intLanes="" shape="300.00,-3.20 300.00,0.00"/>
<connection from="gneE0" to="gneE1" fromLane="0" toLane="0" via=":gneJ1_0_0" dir="s" state="M"/>
<connection from=":gneJ1_0" to="gneE1" fromLane="0" toLane="0" dir="s" state="M"/>
</net>
<routes>
<vType sigma="0" id="t1" maxSpeed="70" minGap="0"/>
<route edges="gneE0 gneE1" color="yellow" id="route_0"/>
<vehicle id="vehicle_0" depart="0.00" departPos="100.00" departSpeed="0" color="red" route="route_0" type="t1"/>
<vehicle id="vehicle_1" depart="0.00" departPos="95.00" departSpeed="20" color="blue" route="route_0" type="t1"/>
</routes>
collision.rou.xml
<net version="1.3" junctionCornerDetail="5" limitTurnSpeed="5.50">
<location netOffset="0.00,0.00" convBoundary="-300.00,0.00,300.00,0.00" origBoundary="10000000000.00,10000000000.00,-10000000000.00,-10000000000.00" projParameter="!"/>
<edge id=":gneJ1_0" function="internal">
<lane id=":gneJ1_0_0" index="0" speed=" 30" length="0.10" shape="0.00,-1.60 0.00,-1.60"/>
</edge>
<edge id="gneE0" from="gneJ0" to="gneJ1" priority="-1">
<lane id="gneE0_0" index="0" speed=" 30" length="300.00" shape="-300.00,-1.60 0.00,-1.60"/>
</edge>
<edge id="gneE1" from="gneJ1" to="gneJ2" priority="-1">
<lane id="gneE1_0" index="0" speed=" 30" length="300.00" shape="0.00,-1.60 300.00,-1.60"/>
</edge>
<junction id="gneJ0" type="dead_end" x="-300.00" y="0.00" incLanes="" intLanes="" shape="-300.00,0.00 -300.00,-3.20"/>
<junction id="gneJ1" type="priority" x="0.00" y="0.00" incLanes="gneE0_0" intLanes=":gneJ1_0_0" shape="0.00,0.00 0.00,-3.20 0.00,0.00">
<request index="0" response="0" foes="0" cont="0"/>
</junction>
<junction id="gneJ2" type="dead_end" x="300.00" y="0.00" incLanes="gneE1_0" intLanes="" shape="300.00,-3.20 300.00,0.00"/>
<connection from="gneE0" to="gneE1" fromLane="0" toLane="0" via=":gneJ1_0_0" dir="s" state="M"/>
<connection from=":gneJ1_0" to="gneE1" fromLane="0" toLane="0" dir="s" state="M"/>
</net>
<routes>
<vType sigma="0" id="t1" maxSpeed="70" minGap="0"/>
<route edges="gneE0 gneE1" color="yellow" id="route_0"/>
<vehicle id="vehicle_0" depart="0.00" departPos="100.00" departSpeed="0" color="red" route="route_0" type="t1"/>
<vehicle id="vehicle_1" depart="0.00" departPos="95.00" departSpeed="20" color="blue" route="route_0" type="t1"/>
</routes>
引用:要在设定的时间强制碰撞,必须使用TraCI。除了设置速度外,还需要使用speedMode和laneChangeMode命令禁用安全检查
这在静脉中可能很难做到。首先:设置速度模式(0)
第二:设置足够落后的车速,设置速度(100);
然后两辆车会相撞