2

I tried to import DSRC vehicles from veins and veins_inet wireless hosts into the same environment. I modified the existing veins_inet3 subproject with contents of the veins modules and defined two vehicle types in SUMO. I tried to import it in .ini file using trancimanager.

I used instant veins to the simulation and I removed one manager from the combination since there can't be two different managers in one simulation.

What I kept was the VeinsInetManager one since it's an extension of TraCIScenarioManagerLaunchd.

The simulation starts to run fine until the DSRC vehicles need to start moving.

I just don't understand how to correct the error I received.

SUMO rou.xml file

<routes>
    <vType id="vtype0" accel="3" decel="4.5" sigma="0.5" length="2.5" minGap="2.5" maxSpeed="30" color="1,1,0"/>
    <route id="route0" edges="A0toB0 B0toB1 B1toA1 A1toA0"/>
    <flow id="flow0" type="vtype0" route="route0" begin="0" period="5" number="10"/>
    <vType id="vtype1" accel="2.6" decel="4.5" sigma="0.5" length="2.5" minGap="2.5" maxSpeed="45" color="1,0,1"/>
    <route id="route1" edges="A0toB0 B0toB1 B1toA1 A1toA0"/>
    <flow id="flow1" type="vtype1" route="route1" begin="2" period="7" number="10"/>
</routes>

and then the veins scenario

package org.car2x.veins.subprojects.veins_inet.example;

import org.car2x.veins.nodes.RSU;
import org.car2x.veins.subprojects.veins_inet.example.WifiCar;
import inet.physicallayer.ieee80211.packetlevel.Ieee80211ScalarRadioMedium;
import inet.visualizer.integrated.IntegratedCanvasVisualizer;
import org.car2x.veins.subprojects.veins_inet.VeinsInetManager;
import org.car2x.veins.nodes.Scenario;
import org.car2x.veins.nodes.Car;
import org.car2x.veins.base.connectionManager.ConnectionManager;

network Scenario
{
    submodules:
        radioMedium: Ieee80211ScalarRadioMedium;
        manager: VeinsInetManager;
        connectionmanager : ConnectionManager;
        Wifi[0]: WifiCar;
        node[0]:Car;
        DSRSU[0]:RSU {
            @display("p=150,140;i=veins/sign/yellowdiamond;is=vs");
        }
}

the omnet.ini file. This is the DSRC part since Wifi part worked fine.

# VeinsInetManager
Scenario.manager.updateInterval = 0.1s
Scenario.manager.host = "localhost"
Scenario.manager.port = 9999
Scenario.manager.autoShutdown = true
Scenario.manager.launchConfig = xmldoc("square.launchd.xml")
Scenario.manager.moduleType = "vtype0=org.car2x.veins.subprojects.veins_inet.example.WifiCar vtype1=org.car2x.veins.nodes.Car *=0"
Scenario.manager.moduleName = "vtype0=Wifi vtype1=node *=0"

#######
Scenario.node[*].nic.phy80211p.usePropagationDelay = true
Scenario.node[*].nic.phy80211p.useNoiseFloor = true
Scenario.node[*].nic.phy80211p.noiseFloor = -98 dBm
Scenario.node[*].nic.phy80211p.minPowerLevel = -110 dBm
Scenario.node[*].nic.mac1609_4.txPower = 20 mW
Scenario.node[*].nic.phy80211p.analogueModels = xmldoc("config.xml")
Scenario.node[*].nic.phy80211p.decider = xmldoc("config.xml","//Decider[@type='Decider80211p']")

#appl layer properties
*.node[*].applType = "TraCIDemo11p"
*.node[*].appl.headerLength = 80 bit
*.node[*].appl.sendBeacons = true
*.node[*].appl.dataOnSch = true
*.node[*].appl.beaconInterval = 1s

##########################################################
*.node[*].veinsmobility.x = 0
*.node[*].veinsmobility.y = 0
*.node[*].veinsmobility.z = 0
*.node[*].veinsmobility.setHostSpeed = false


and this is the complete error I get


TraCIMobility::getExternalId called with no external_id set yet -- in module (veins::TraCIDemo11p) Scenario.node[1].appl (id=94), at t=2.1s, event #25

How can I correct this error?

This is the debugger output I get.

debugger output

  • Please read [Under what circumstances may I add “urgent” or other similar phrases to my question, in order to obtain faster answers?](//meta.stackoverflow.com/q/326569) - the summary is that this is not an ideal way to address volunteers, and is probably counterproductive to obtaining answers. Please refrain from adding this to your questions. – halfer Aug 04 '20 at 09:25
  • 1
    In general, this error is thrown when a module containing `TraCIMobility` was created without being initialized by `TraCIScenarioManager`. However, without knowing which software versions you are using it is impossible to help. I am guessing Veins 5.0 and INET 3.6.5? Also, you seem to have changed quite a lot, so it will be hard to reproduce your error. Are you able to share a simulation that reproduces the error you are getting? Are you running your simulation in debug mode and with `debug-on-errors = true`, so that you can be sure to catch errors early? What does valgrind/memcheck say? – Christoph Sommer Aug 04 '20 at 12:57
  • What I used was Instant veins latest version. My scenario manager is VeinsInetManager. I removed the one was in veins cause there can't be two different managers in one sim plus VeinsInetManager is an extension of TraciScenarioManagerLauched. – Sandeepa Kariyawasam Aug 05 '20 at 15:55

0 Answers0