ms-van3t-devs / ms-van3t

A multi-stack, ETSI compliant, V2X framework for ns-3.
GNU General Public License v2.0
102 stars 33 forks source link

V2X Examples are filing to run #26

Closed brianach closed 4 months ago

brianach commented 4 months ago

None of the example will run for me. The logs seems to suggest that the script files or config files are not right. Is it possible that key mappings are altered during the build although I would imagine this is unlikely. I'm running Ubuntu 20.04.4. Here is the output when I run ./ns3 run "v2v-carla-80211p"

:~/ms-van3t/ns-3-dev$ ./ns3 run "v2v-carla-80211p" [ 0%] Building CXX object src/automotive/CMakeFiles/libautomotive-obj.dir/helper/cooperativePerception-helper.cc.o [ 0%] Building CXX object src/automotive/CMakeFiles/libautomotive-obj.dir/model/Applications/cooperativePerception.cc.o [ 0%] Building CXX object src/automotive/CMakeFiles/libautomotive-obj.dir/model/Facilities/vdpopencda.cc.o /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Facilities/vdpopencda.cc: In member function ‘virtual ns3::VDP::CAM_mandatory_data_t ns3::VDPOpenCDA::getCAMMandatoryData()’: /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Facilities/vdpopencda.cc:51:22: error: ‘LongitudinalAccelerationValue_unavailable’ was not declared in this scope; did you mean ‘AccelerationValue_unavailable’? 51 | if ((accDECI) > LongitudinalAccelerationValue_unavailable) | ^~~~~~~~~ | AccelerationValue_unavailable /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Facilities/vdpopencda.cc: In member function ‘virtual ns3::VDP::CPM_mandatory_data_t ns3::VDPOpenCDA::getCPMMandatoryData()’: /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Facilities/vdpopencda.cc:122:22: error: ‘LongitudinalAccelerationValue_unavailable’ was not declared in this scope; did you mean ‘AccelerationValue_unavailable’? 122 | if ((accDECI) > LongitudinalAccelerationValue_unavailable) | ^~~~~~~~~ | AccelerationValue_unavailable In file included from /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Facilities/vdpopencda.h:4, from /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Facilities/vdpopencda.cc:1: /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Facilities/vdp.h: In instantiation of ‘T ns3::VDPDataItem::setData(T) [with T = int]’: /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Facilities/vdpopencda.cc:213:43: required from here /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Facilities/vdp.h:31:62: warning: no return statement in function returning non-void [-Wreturn-type] 31 | T setData(T data) {m_dataitem=data; m_available=true;} | ^ make[3]: [src/automotive/CMakeFiles/libautomotive-obj.dir/build.make:609: src/automotive/CMakeFiles/libautomotive-obj.dir/model/Facilities/vdpopencda.cc.o] Error 1 make[3]: Waiting for unfinished jobs.... In file included from /home/brian/ms-van3t/ns-3-dev/src/automotive/helper/cooperativePerception-helper.cc:24: /home/brian/ms-van3t/ns-3-dev/build/include/ns3/cooperativePerception.h:57:35: error: ‘CPM’ was not declared in this scope; did you mean ‘CAM’? 57 | void receiveCPM (asn1cpp::Seq cpm, Address from); | ^~~ | CAM /home/brian/ms-van3t/ns-3-dev/build/include/ns3/cooperativePerception.h:57:38: error: template argument 1 is invalid 57 | void receiveCPM (asn1cpp::Seq cpm, Address from); | ^ /home/brian/ms-van3t/ns-3-dev/build/include/ns3/cooperativePerception.h:76:49: error: ‘CPM’ was not declared in this scope; did you mean ‘CAM’? 76 | vehicleData_t translateCPMdata(asn1cpp::Seq cpm, int objectIndex, int newID); | ^~~ | CAM /home/brian/ms-van3t/ns-3-dev/build/include/ns3/cooperativePerception.h:76:52: error: template argument 1 is invalid 76 | vehicleData_t translateCPMdata(asn1cpp::Seq cpm, int objectIndex, int newID); | ^ make[3]: * [src/automotive/CMakeFiles/libautomotive-obj.dir/build.make:206: src/automotive/CMakeFiles/libautomotive-obj.dir/helper/cooperativePerception-helper.cc.o] Error 1 In file included from /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc:20: /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.h:57:35: error: ‘CPM’ was not declared in this scope; did you mean ‘CAM’? 57 | void receiveCPM (asn1cpp::Seq cpm, Address from); | ^~~ | CAM /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.h:57:38: error: template argument 1 is invalid 57 | void receiveCPM (asn1cpp::Seq cpm, Address from); | ^ /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.h:76:49: error: ‘CPM’ was not declared in this scope; did you mean ‘CAM’? 76 | vehicleData_t translateCPMdata(asn1cpp::Seq cpm, int objectIndex, int newID); | ^~~ | CAM /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.h:76:52: error: template argument 1 is invalid 76 | vehicleData_t translateCPMdata(asn1cpp::Seq cpm, int objectIndex, int newID); | ^ /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc: In member function ‘virtual void ns3::cooperativePerception::StartApplication()’: /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc:229:21: error: ‘StationType_specialVehicles’ was not declared in this scope; did you mean ‘StationType_specialVehicle’? 229 | stationtype = StationType_specialVehicles; | ^~~~~~~ | StationType_specialVehicle In file included from /home/brian/ms-van3t/ns-3-dev/build/include/ns3/vdp.h:7, from /home/brian/ms-van3t/ns-3-dev/build/include/ns3/vdpopencda.h:4, from /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.h:5, from /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc:20: /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc: In member function ‘void ns3::cooperativePerception::receiveCAM(asn1cpp::Seq, ns3::Address)’: /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc:320:51: error: ‘ItsPduHeader_t’ {aka ‘struct ItsPduHeader’} has no member named ‘stationID’; did you mean ‘stationId’? 320 | << asn1cpp::getField(cam->header.stationID,long) << " --> GeoPosition: [" << fromLon << ", " << fromLat << "]" | ^~~~~ /home/brian/ms-van3t/ns-3-dev/build/include/ns3/Getter.hpp:203:20: note: in definition of macro ‘getField’ 203 | getterField(field, ## VA_ARGS) | ^~~~~ /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc:327:42: error: ‘ItsPduHeader_t’ {aka ‘struct ItsPduHeader’} has no member named ‘messageID’; did you mean ‘messageId’? 327 | m_csv_ofstream_cam << cam->header.messageID << "," << cam->header.stationID << ","; | ^~~~~ | messageId /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc:327:74: error: ‘ItsPduHeader_t’ {aka ‘struct ItsPduHeader’} has no member named ‘stationID’; did you mean ‘stationId’? 327 | m_csv_ofstream_cam << cam->header.messageID << "," << cam->header.stationID << ","; | ^~~~~ | stationId In file included from /home/brian/ms-van3t/ns-3-dev/build/include/ns3/vdp.h:7, from /home/brian/ms-van3t/ns-3-dev/build/include/ns3/vdpopencda.h:4, from /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.h:5, from /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc:20: /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc:331:161: error: ‘AccelerationComponent_t’ {aka ‘struct AccelerationComponent’} has no member named ‘longitudinalAccelerationValue’ 331 | m_csv_ofstream_cam << asn1cpp::getField(cam->cam.camParameters.highFrequencyContainer.choice.basicVehicleContainerHighFrequency.longitudinalAcceleration.longitudinalAccelerationValue,double)/DECI << std::endl; | ^~~~~~~~~ /home/brian/ms-van3t/ns-3-dev/build/include/ns3/Getter.hpp:203:20: note: in definition of macro ‘getField’ 203 | getterField(field, ## VA_ARGS) | ^~~~~ /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc: At global scope: /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc:337:51: error: ‘CPM’ was not declared in this scope; did you mean ‘CAM’? 337 | cooperativePerception::receiveCPM (asn1cpp::Seq cpm, Address from) | ^~~ | CAM /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc:337:54: error: template argument 1 is invalid 337 | cooperativePerception::receiveCPM (asn1cpp::Seq cpm, Address from) | ^ In file included from /home/brian/ms-van3t/ns-3-dev/build/include/ns3/vdp.h:7, from /home/brian/ms-van3t/ns-3-dev/build/include/ns3/vdpopencda.h:4, from /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.h:5, from /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc:20: /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc: In member function ‘void ns3::cooperativePerception::receiveCPM(int, ns3::Address)’: /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc:342:132: error: base operand of ‘->’ is not a pointer 342 | std::cout << "["<< Simulator::Now ().GetSeconds ()<<"] " << m_id <<" received a new CPM from vehicle " << asn1cpp::getField(cpm->header.stationID,long) <<" with "<< asn1cpp::getField(cpm->cpm.cpmParameters.numberOfPerceivedObjects,long)<< " perceived objects." <<std::endl; | ^~ /home/brian/ms-van3t/ns-3-dev/build/include/ns3/Getter.hpp:203:20: note: in definition of macro ‘getField’ 203 | getterField(field, ## VA_ARGS__) | ^~~~~ /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc:342:191: error: base operand of ‘->’ is not a pointer 342 | std::cout << "["<< Simulator::Now ().GetSeconds ()<<"] " << m_id <<" received a new CPM from vehicle " << asn1cpp::getField(cpm->header.stationID,long) <<" with "<< asn1cpp::getField(cpm->cpm.cpmParameters.numberOfPerceivedObjects,long)<< " perceived objects." <<std::endl; | ^~ /home/brian/ms-van3t/ns-3-dev/build/include/ns3/Getter.hpp:203:20: note: in definition of macro ‘getField’ 203 | getterField(field, ## VA_ARGS) | ^~~~~ /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc:343:39: error: base operand of ‘->’ is not a pointer 343 | int fromID = asn1cpp::getField(cpm->header.stationID,long); | ^~ /home/brian/ms-van3t/ns-3-dev/build/include/ns3/Getter.hpp:203:20: note: in definition of macro ‘getField’ 203 | getterField(field, ## VA_ARGS) | ^~~~~ /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc:349:43: error: base operand of ‘->’ is not a pointer 349 | auto PObjects = asn1cpp::getSeqOpt(cpm->cpm.cpmParameters.perceivedObjectContainer,PerceivedObjectContainer,&POs_ok); | ^~ /home/brian/ms-van3t/ns-3-dev/build/include/ns3/Getter.hpp:222:18: note: in definition of macro ‘getSeqOpt’ 222 | getterSeqOpt(field, &ASN1CPP_ASN1C_DEF(R), ## __VA_ARGS) | ^~~~~ /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc:352:61: error: base operand of ‘->’ is not a pointer 352 | int PObjects_size = asn1cpp::sequenceof::getSize(cpm->cpm.cpmParameters.perceivedObjectContainer); | ^~ In file included from /home/brian/ms-van3t/ns-3-dev/build/include/ns3/vdp.h:7, from /home/brian/ms-van3t/ns-3-dev/build/include/ns3/vdpopencda.h:4, from /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.h:5, from /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc:20: /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc:357:53: error: base operand of ‘->’ is not a pointer 357 | PO_seq = asn1cpp::sequenceof::getSeq(cpm->cpm.cpmParameters.perceivedObjectContainer,PerceivedObject,i); | ^~ /home/brian/ms-van3t/ns-3-dev/build/include/ns3/Getter.hpp:219:15: note: in definition of macro ‘getSeq’ 219 | getterSeq(field, &ASN1CPP_ASN1C_DEF(R), ## VA_ARGS__) | ^~~~~ /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc:359:68: error: ‘struct PerceivedObject’ has no member named ‘objectID’; did you mean ‘objectId’? 359 | if(m_recvCPMmap[fromID].find(asn1cpp::getField(PO_seq->objectID,long)) == m_recvCPMmap[fromID].end()) | ^~~~ /home/brian/ms-van3t/ns-3-dev/build/include/ns3/Getter.hpp:203:20: note: in definition of macro ‘getField’ 203 | getterField(field, ## VA_ARGS) | ^~~~~ /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc:363:60: error: ‘struct PerceivedObject’ has no member named ‘objectID’; did you mean ‘objectId’? 363 | if(m_LDM->lookup(asn1cpp::getField(PO_seq->objectID,long),PO_data) == LDM::LDM_OK) | ^~~~ /home/brian/ms-van3t/ns-3-dev/build/include/ns3/Getter.hpp:203:20: note: in definition of macro ‘getField’ 203 | getterField(field, ## VA_ARGS) | ^~~~~ /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc:379:68: error: ‘struct PerceivedObject’ has no member named ‘objectID’; did you mean ‘objectId’? 379 | m_recvCPMmap[fromID][asn1cpp::getField(PO_seq->objectID,long)] = newID; | ^~~~ /home/brian/ms-van3t/ns-3-dev/build/include/ns3/Getter.hpp:203:20: note: in definition of macro ‘getField’ 203 | getterField(field, ## VA_ARGS) | ^~~~~ /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc:386:68: error: ‘struct PerceivedObject’ has no member named ‘objectID’; did you mean ‘objectId’? 386 | m_recvCPMmap[fromID][asn1cpp::getField(PO_seq->objectID,long)] = asn1cpp::getField(PO_seq->objectID,long); | ^~~~ /home/brian/ms-van3t/ns-3-dev/build/include/ns3/Getter.hpp:203:20: note: in definition of macro ‘getField’ 203 | getterField(field, ## __VA_ARGS) | ^~~~~ /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc:386:112: error: ‘struct PerceivedObject’ has no member named ‘objectID’; did you mean ‘objectId’? 386 | m_recvCPMmap[fromID][asn1cpp::getField(PO_seq->objectID,long)] = asn1cpp::getField(PO_seq->objectID,long); | ^~~~ /home/brian/ms-van3t/ns-3-dev/build/include/ns3/Getter.hpp:203:20: note: in definition of macro ‘getField’ 203 | getterField(field, ## VA_ARGS__) | ^~~~~ /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc:392:101: error: ‘struct PerceivedObject’ has no member named ‘objectID’; did you mean ‘objectId’? 392 | m_LDM->insert(translateCPMdata(cpm,i,m_recvCPMmap[fromID][asn1cpp::getField(PO_seq->objectID,long)])); | ^~~~ /home/brian/ms-van3t/ns-3-dev/build/include/ns3/Getter.hpp:203:20: note: in definition of macro ‘getField’ 203 | getterField(field, ## VA_ARGS) | ^~~~~ /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc: At global scope: /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc:399:57: error: ‘CPM’ was not declared in this scope; did you mean ‘CAM’? 399 | cooperativePerception::translateCPMdata (asn1cpp::Seq cpm, int objectIndex, int newID) | ^~~ | CAM /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc:399:60: error: template argument 1 is invalid 399 | cooperativePerception::translateCPMdata (asn1cpp::Seq cpm, int objectIndex, int newID) | ^ In file included from /home/brian/ms-van3t/ns-3-dev/build/include/ns3/vdp.h:7, from /home/brian/ms-van3t/ns-3-dev/build/include/ns3/vdpopencda.h:4, from /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.h:5, from /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc:20: /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc: In member function ‘ns3::vehicleData_t ns3::cooperativePerception::translateCPMdata(int, int, int)’: /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc:404:45: error: base operand of ‘->’ is not a pointer 404 | PO_seq = asn1cpp::sequenceof::getSeq(cpm->cpm.cpmParameters.perceivedObjectContainer,PerceivedObject,objectIndex); | ^~ /home/brian/ms-van3t/ns-3-dev/build/include/ns3/Getter.hpp:219:15: note: in definition of macro ‘getSeq’ 219 | getterSeq(field, &ASN1CPP_ASN1C_DEF(R), ## VA_ARGS) | ^~~~~ /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc:407:52: error: ‘struct PerceivedObject’ has no member named ‘objectID’; did you mean ‘objectId’? 407 | retval.stationID = asn1cpp::getField(PO_seq->objectID,long); | ^~~~ /home/brian/ms-van3t/ns-3-dev/build/include/ns3/Getter.hpp:203:20: note: in definition of macro ‘getField’ 203 | getterField(field, ## __VA_ARGS) | ^~~~~ /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc:411:54: error: ‘struct PerceivedObject’ has no member named ‘planarObjectDimension1’; did you mean ‘objectDimensionZ’? 411 | retval.vehicleLength = asn1cpp::getField(PO_seq->planarObjectDimension1->value,long); | ^~~~~~ /home/brian/ms-van3t/ns-3-dev/build/include/ns3/Getter.hpp:203:20: note: in definition of macro ‘getField’ 203 | getterField(field, ## VA_ARGS__) | ^~~~~ /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc:412:53: error: ‘struct PerceivedObject’ has no member named ‘planarObjectDimension2’; did you mean ‘objectDimensionZ’? 412 | retval.vehicleWidth = asn1cpp::getField(PO_seq->planarObjectDimension2->value,long); | ^~~~~~ /home/brian/ms-van3t/ns-3-dev/build/include/ns3/Getter.hpp:203:20: note: in definition of macro ‘getField’ 203 | getterField(field, ## VA_ARGS) | ^~~~~ /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc:413:43: error: base operand of ‘->’ is not a pointer 413 | retval.heading = asn1cpp::getField(cpm->cpm.cpmParameters.stationDataContainer->choice.originatingVehicleContainer.heading.headingValue,double)/10 + | ^~ /home/brian/ms-van3t/ns-3-dev/build/include/ns3/Getter.hpp:203:20: note: in definition of macro ‘getField’ 203 | getterField(field, ## VA_ARGS) | ^~~~~ /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc:414:51: error: ‘struct PerceivedObject’ has no member named ‘yawAngle’ 414 | asn1cpp::getField(PO_seq->yawAngle->value,double)/10; | ^~~~ /home/brian/ms-van3t/ns-3-dev/build/include/ns3/Getter.hpp:203:20: note: in definition of macro ‘getField’ 203 | getterField(field, ## __VA_ARGS) | ^~~~~ /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc:418:54: error: base operand of ‘->’ is not a pointer 418 | retval.speed_ms = (double) (asn1cpp::getField(cpm->cpm.cpmParameters.stationDataContainer->choice.originatingVehicleContainer.speed.speedValue,long) + | ^~ /home/brian/ms-van3t/ns-3-dev/build/include/ns3/Getter.hpp:203:20: note: in definition of macro ‘getField’ 203 | getterField(field, ## VA_ARGS__) | ^~~~~ /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc:419:51: error: ‘struct PerceivedObject’ has no member named ‘xSpeed’ 419 | asn1cpp::getField(PO_seq->xSpeed.value,long))/CENTI; | ^~ /home/brian/ms-van3t/ns-3-dev/build/include/ns3/Getter.hpp:203:20: note: in definition of macro ‘getField’ 203 | getterField(field, ## VA_ARGS) | ^~~~~ /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc:421:43: error: base operand of ‘->’ is not a pointer 421 | double fromLon = asn1cpp::getField(cpm->cpm.cpmParameters.managementContainer.referencePosition.longitude,double)/DOT_ONE_MICRO; | ^~ /home/brian/ms-van3t/ns-3-dev/build/include/ns3/Getter.hpp:203:20: note: in definition of macro ‘getField’ 203 | getterField(field, ## VA_ARGS) | ^~~~~ /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc:422:43: error: base operand of ‘->’ is not a pointer 422 | double fromLat = asn1cpp::getField(cpm->cpm.cpmParameters.managementContainer.referencePosition.latitude,double)/DOT_ONE_MICRO; | ^~ /home/brian/ms-van3t/ns-3-dev/build/include/ns3/Getter.hpp:203:20: note: in definition of macro ‘getField’ 203 | getterField(field, ## VA_ARGS) | ^~~~~ /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc:438:51: error: ‘struct PerceivedObject’ has no member named ‘xDistance’ 438 | point_type objPoint(asn1cpp::getField(PO_seq->xDistance.value,double)/CENTI,asn1cpp::getField(PO_seq->yDistance.value,double)/CENTI); | ^~~~~ /home/brian/ms-van3t/ns-3-dev/build/include/ns3/Getter.hpp:203:20: note: in definition of macro ‘getField’ 203 | getterField(field, ## __VA_ARGS) | ^~~~~ /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc:438:107: error: ‘struct PerceivedObject’ has no member named ‘yDistance’ 438 | point_type objPoint(asn1cpp::getField(PO_seq->xDistance.value,double)/CENTI,asn1cpp::getField(PO_seq->yDistance.value,double)/CENTI); | ^~~~~ /home/brian/ms-van3t/ns-3-dev/build/include/ns3/Getter.hpp:203:20: note: in definition of macro ‘getField’ 203 | getterField(field, ## VA_ARGS) | ^~~~~ /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc:439:45: error: base operand of ‘->’ is not a pointer 439 | double fromAngle = asn1cpp::getField(cpm->cpm.cpmParameters.stationDataContainer->choice.originatingVehicleContainer.heading.headingValue,double)/10; | ^~ /home/brian/ms-van3t/ns-3-dev/build/include/ns3/Getter.hpp:203:20: note: in definition of macro ‘getField’ 203 | getterField(field, ## VA_ARGS) | ^~~~~ /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc:453:55: error: ‘struct PerceivedObject’ has no member named ‘xDistance’ 453 | objectPosition.x += asn1cpp::getField(PO_seq->xDistance.value,double)/CENTI; | ^~~~~ /home/brian/ms-van3t/ns-3-dev/build/include/ns3/Getter.hpp:203:20: note: in definition of macro ‘getField’ 203 | getterField(field, ## VA_ARGS__) | ^~~~~ /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc:454:55: error: ‘struct PerceivedObject’ has no member named ‘yDistance’ 454 | objectPosition.y += asn1cpp::getField(PO_seq->yDistance.value,double)/CENTI; | ^~~~~ /home/brian/ms-van3t/ns-3-dev/build/include/ns3/Getter.hpp:203:20: note: in definition of macro ‘getField’ 203 | getterField(field, ## VA_ARGS) | ^~~~~ /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc:463:53: error: ‘struct PerceivedObject’ has no member named ‘xSpeed’ 463 | point_type speedPoint(asn1cpp::getField(PO_seq->xSpeed.value,double)/CENTI,asn1cpp::getField(PO_seq->ySpeed.value,double)/CENTI); | ^~ /home/brian/ms-van3t/ns-3-dev/build/include/ns3/Getter.hpp:203:20: note: in definition of macro ‘getField’ 203 | getterField(field, ## __VA_ARGS) | ^~~~~ /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc:463:106: error: ‘struct PerceivedObject’ has no member named ‘ySpeed’ 463 | point_type speedPoint(asn1cpp::getField(PO_seq->xSpeed.value,double)/CENTI,asn1cpp::getField(PO_seq->ySpeed.value,double)/CENTI); | ^~ /home/brian/ms-van3t/ns-3-dev/build/include/ns3/Getter.hpp:203:20: note: in definition of macro ‘getField’ 203 | getterField(field, ## VA_ARGS__) | ^~~~~ /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc:465:44: error: base operand of ‘->’ is not a pointer 465 | retval.speed_ms = asn1cpp::getField(cpm->cpm.cpmParameters.stationDataContainer->choice.originatingVehicleContainer.speed.speedValue,double)/CENTI + boost::geometry::get<0>(speedPoint); | ^~ /home/brian/ms-van3t/ns-3-dev/build/include/ns3/Getter.hpp:203:20: note: in definition of macro ‘getField’ 203 | getterField(field, ## VA_ARGS) | ^~~~~ /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc:467:48: error: base operand of ‘->’ is not a pointer 467 | retval.camTimestamp = asn1cpp::getField(cpm->cpm.generationDeltaTime,long); | ^~ /home/brian/ms-van3t/ns-3-dev/build/include/ns3/Getter.hpp:203:20: note: in definition of macro ‘getField’ 203 | getterField(field, ## VA_ARGS) | ^~~~~ /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc:468:92: error: ‘struct PerceivedObject’ has no member named ‘timeOfMeasurement’ 468 | retval.timestamp_us = Simulator::Now().GetMicroSeconds () - (asn1cpp::getField(PO_seq->timeOfMeasurement,long)*1000); | ^~~~~ /home/brian/ms-van3t/ns-3-dev/build/include/ns3/Getter.hpp:203:20: note: in definition of macro ‘getField’ 203 | getterField(field, ## VA_ARGS) | ^~~~~ /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc:470:53: error: base operand of ‘->’ is not a pointer 470 | retval.perceivedBy.setData(asn1cpp::getField(cpm->header.stationID,long)); | ^~ /home/brian/ms-van3t/ns-3-dev/build/include/ns3/Getter.hpp:203:20: note: in definition of macro ‘getField’ 203 | getterField(field, ## VA_ARGS) | ^~~~~ /home/brian/ms-van3t/ns-3-dev/src/automotive/model/Applications/cooperativePerception.cc:471:51: error: ‘struct PerceivedObject’ has no member named ‘objectConfidence’ 471 | retval.confidence = asn1cpp::getField(PO_seq->objectConfidence,long); | ^~~~ /home/brian/ms-van3t/ns-3-dev/build/include/ns3/Getter.hpp:203:20: note: in definition of macro ‘getField’ 203 | getterField(field, ## __VA_ARGS) | ^~~~~ make[3]: ** [src/automotive/CMakeFiles/libautomotive-obj.dir/build.make:349: src/automotive/CMakeFiles/libautomotive-obj.dir/model/Applications/cooperativePerception.cc.o] Error 1 make[2]: [CMakeFiles/Makefile2:4122: src/automotive/CMakeFiles/libautomotive-obj.dir/all] Error 2 make[1]: [CMakeFiles/Makefile2:4392: src/automotive/examples/CMakeFiles/v2v-carla-80211p.dir/rule] Error 2 make: [Makefile:605: v2v-carla-80211p] Error 2

carlosrisma commented 4 months ago

Hello brianach,

thanks for reporting this issue. The problem was due to the latest update for supporting CPMv2 which was not yet tested in co-simulation with CARLA. Now with the latest commit the issue should be resolved, please let us know.

Best regards, Carlos

brianach commented 4 months ago

Hi Carlos,

thanks for the update. I rebuilt everything and unfortunately I'm still having issues.

msg="Error: File 'CARLA-OpenCDA.conf' does not exist. Please specify valid configuration file.", file=/home/brian/ms-van3t/ns-3-dev/src/automotive/examples/v2v-carlaMobility-80211p.cc, line=150
terminate called without an active exception
Command 'build/src/automotive/examples/ns3-dev-v2v-carla-80211p-optimized' died with <Signals.SIGABRT: 6>.

Actually I don't know if its just my setup but when I ran switch_ms-van3t-CARLA.sh it also ran into issues finding files:

./switch_ms-van3t-CARLA.sh: line 207: cd: src/automotive/: No such file or directory

I was able to resolve this by editing lines 207, 215 & 228 and supplying the full path. I forgot to mention I had to do this on the previous installation also.

Brían

brianach commented 4 months ago

Hi again Carlos,

I manually edited line 71 in v2v-carlaMobility-80211p.cc and gave the full path to CARLA-OpenCDA.conf to see if it would make any difference and it runs but seems to be stuck waiting for OpenCDA. Not sure what is missing at this point.

brian@brian-Latitude-5530:~/ms-van3t/ns-3-dev$ ./ns3 run "v2v-carla-80211p"
Scanning dependencies of target v2v-carla-80211p
[  0%] Building CXX object src/automotive/examples/CMakeFiles/v2v-carla-80211p.dir/v2v-carlaMobility-80211p.cc.o
[  0%] Linking CXX executable ../../../../build/src/automotive/examples/ns3-dev-v2v-carla-80211p-optimized
Number of vehicles: 26
Datarate: OfdmRate12MbpsBW10MHz
Executing: cd /home/brian/ms-van3t && ./CarlaUE4.sh -prefernvidia
CARLA server ready.
Executing: cd /home/brian/OpenCDA && /home/brian/anaconda3/envs/msvan3t_carla/bin/python3 -u opencda.py -t ms_van3t_example -v 0.9.12
OpenCDAClient::startSimulation()
Waiting for OpenCDA Control Interface to be ready.
Waiting for OpenCDA Control Interface to be ready.
Waiting for OpenCDA Control Interface to be ready.

Brían

carlosrisma commented 4 months ago

Hi Brían,

the idea is that the user should create the file CARLA-OpenCDA.conf inside the ns-3-dev directory with all the full paths for each thing, perhaps the problem is that you launched the ./switch_ms-van3t-CARLA.sh script from the root ms-van3t instead of the ns-3-dev, we will update the installation script to avoid having the file in both directories.

About the issue when starting OpenCDA, there could be several reasons, do you see the CARLA window? After CARLA is launched, do you see the map change and the camera and LiDAR windows pop-up? I would ask if you could please share the output in the file /tmp/opencda_output.txt which should give a better idea of what is wrong.

Carlos

brianach commented 4 months ago

Ok I've added CARLA-OpenCDA.conf to the ns-3-dev folder now and it runs as above. CARLA window doesn't launch at all. I cna run Carla manually and it displays a with the "Waiting for OpenCDA Control Interface" message. The contents of the file you requested are here

OpenCDA Version: 0.1.3
Traceback (most recent call last):
  File "opencda.py", line 78, in <module>
    main()
  File "opencda.py", line 62, in main
    "opencda.scenario_testing.%s" % opt.test_scenario)
  File "/home/brian/anaconda3/envs/msvan3t_carla/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/brian/OpenCDA/opencda/scenario_testing/ms_van3t_example.py", line 6, in <module>
    import opencda.scenario_testing.utils.cosim_api as sim_api
  File "/home/brian/OpenCDA/opencda/scenario_testing/utils/cosim_api.py", line 25, in <module>
    from opencda.scenario_testing.utils.sim_api import ScenarioManager
  File "/home/brian/OpenCDA/opencda/scenario_testing/utils/sim_api.py", line 22, in <module>
    from opencda.customize.core.common.vehicle_manager import ExtendedVehicleManager
  File "/home/brian/OpenCDA/opencda/customize/core/common/vehicle_manager.py", line 19, in <module>
    from opencda.customize.v2x.v2x_agent import V2XAgent
  File "/home/brian/OpenCDA/opencda/customize/v2x/v2x_agent.py", line 14, in <module>
    from opencda.customize.v2x.PLDMservice import PLDMservice
  File "/home/brian/OpenCDA/opencda/customize/v2x/PLDMservice.py", line 3, in <module>
    from opencda.customize.v2x.PLDM import PLDM
  File "/home/brian/OpenCDA/opencda/customize/v2x/PLDM.py", line 15, in <module>
    from opencda.customize.v2x.LDMutils import LDM_to_lidarObjects
  File "/home/brian/OpenCDA/opencda/customize/v2x/LDMutils.py", line 14, in <module>
    from filterpy.kalman import KalmanFilter
ModuleNotFoundError: No module named 'filterpy'
carlosrisma commented 4 months ago

I spotted the problem, apparently, there were 2 missing dependencies in the switch script, I just updated it so thank you very much for reporting the issue. For you to solve the issue, together with pulling from the last commit, to avoid running the script from scratch I suggest you run the following commands: conda activate msvan3t_carla pip install filterpy pip install psutil

Let me know if the issue is solved, thanks!

Carlos

brianach commented 4 months ago

I feel like its something I'm doing wrong. The first command results in this:

brian@brian-Latitude-5530:~/ms-van3t/ns-3-dev$ conda activate msvan3t_carla
conda: command not found

The two pip commands ran fine. Then when I run the example I get the same as the last issue. What might be an indicator of something else being wrong is that then I run ./ns configure I get this as part of the output.

Build profile                 : optimized
Build directory               : /home/brian/ms-van3t/ns-3-dev/build
BRITE Integration             : OFF (missing dependency)
DES Metrics event collection  : OFF (not requested)
DPDK NetDevice                : OFF (not requested)
Emulation FdNetDevice         : ON
Examples                      : ON
File descriptor NetDevice     : ON
GNU Scientific Library (GSL)  : ON
GtkConfigStore                : ON
LibXml2 support               : ON
MPI Support                   : OFF (not requested)
ns-3 Click Integration        : OFF (missing dependency)
ns-3 OpenFlow Integration     : OFF (missing dependency)
Netmap emulation FdNetDevice  : OFF (missing dependency)
PyViz visualizer              : OFF (missing dependency)
Python API Scanning Support   : OFF (not requested)
Python Bindings               : OFF (not requested)
Real Time Simulator           : ON
SQLite support                : ON
Tap Bridge                    : ON
Tap FdNetDevice               : ON
Tests                         : ON

The output from _/tmp/opencda_output.txt_ is the same as before so even though both pip commands ran ok I guess that the conda commands needs to work first.

carlosrisma commented 4 months ago

Indeed the conda environment needs to be activated before installing the packages because is the one you use for the simulation. Try running source ~/anaconda3/etc/profile.d/conda.sh before running conda activate msvan3t_carla.

melihyazgan commented 4 months ago

You should initialize your conda environment. Just google it you will find quite a lot examples. But if you install everything with provided script, the conda should be initialized and each pip library should be installed under the hood of the environment.

brianach commented 4 months ago

Ok that sorted the missing modules. I also got a missing grpc module error and installed grpcio whcih fixed that but still not working. Now it looks like my carla installtion is the problem. Here's the ouput from the OpenCDA log:

OpenCDA Version: 0.1.3
 Town06 is not found in your CARLA repo! Please download all town maps to your CARLA repo!
Traceback (most recent call last):
  File "/home/brian/OpenCDA/opencda/scenario_testing/ms_van3t_example.py", line 33, in run_scenario
    cav_world=cav_world)
  File "/home/brian/OpenCDA/opencda/scenario_testing/utils/sim_api.py", line 203, in __init__
    if not self.world:
AttributeError: 'ScenarioManager' object has no attribute 'world'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "opencda.py", line 78, in <module>
    main()
  File "opencda.py", line 73, in main
    scenario_runner(opt, scene_dict)
  File "/home/brian/OpenCDA/opencda/scenario_testing/ms_van3t_example.py", line 76, in run_scenario
    stop_event.set() # stop the co-simulation
UnboundLocalError: local variable 'stop_event' referenced before assignment

and here is the output from the Carla log:

sh: 1: ./CarlaUE4.sh: not found
brianach commented 4 months ago

Hi guys, apologies but it looks as if the problem is at least partially between the chair and the keyboard. Previously I checked carla installation by just typing "carla" at the command line and I saw an application which was looking for a project file to load. On checking it more closely I see that "Carla" is an audio application :#

I'll see if I can resolve this first. Obviously or at least it seems like there might be some kind of mixup here.

Brían

brianach commented 4 months ago

Just for completeness I tried the ms-van3t CARLA installation script again and it seems that the reason CARLA is not being installed is that the repo in the script _"https://carla-releases.s3.eu-west-3.amazonaws.com/Linux/CARLA_0.9.12.tar.gz "_ doesn't exit

--2024-03-21 17:58:34--  https://carla-releases.s3.eu-west-3.amazonaws.com/Linux/CARLA_0.9.12.tar.gz
Resolving carla-releases.s3.eu-west-3.amazonaws.com (carla-releases.s3.eu-west-3.amazonaws.com)... 3.5.224.140, 3.5.226.127
Connecting to carla-releases.s3.eu-west-3.amazonaws.com (carla-releases.s3.eu-west-3.amazonaws.com)|3.5.224.140|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2024-03-21 17:58:34 ERROR 404: Not Found.

--2024-03-21 17:58:34--  https://carla-releases.s3.eu-west-3.amazonaws.com/Linux/AdditionalMaps_0.9.12.tar.gz
Resolving carla-releases.s3.eu-west-3.amazonaws.com (carla-releases.s3.eu-west-3.amazonaws.com)... 3.5.226.127, 3.5.224.140
Connecting to carla-releases.s3.eu-west-3.amazonaws.com (carla-releases.s3.eu-west-3.amazonaws.com)|3.5.226.127|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2024-03-21 17:58:34 ERROR 404: Not Found.

or is not available on s3

<Error>
<Code>NoSuchBucket</Code>
<Message>The specified bucket does not exist</Message>
<BucketName>carla-releases</BucketName>
<RequestId>CBHHSN4G2V37D67F</RequestId>
<HostId>
h5mnZcZVfc+4g25onbE7PmsH+17ZT3x3DjH3V3BIKFFys6xemYHPyUAUCeUQzjf9m/J+EAULGb2zxQC7v2eh0A==
</HostId>
</Error>

IS it ok to install the latest version of CARLA manually and use that?

brianach commented 4 months ago

I manually installed the correct Carla version and it launches but exits before the simulation can run. I think my laptop is not powerful enough.

4.26.2-0+++UE4+Release-4.26 522 0
Disabling core dumps.
MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0

Signal 11 caught.
Malloc Size=65538 LargeMemoryPoolOffset=65554 
Malloc Size=131160 LargeMemoryPoolOffset=196744 
Malloc Size=131160 LargeMemoryPoolOffset=327928 
CommonUnixCrashHandler: Signal=11
Engine crash handling finished; re-raising signal 11 for the default handler. Good bye.
Segmentation fault (core dumped)
brianach commented 4 months ago

Hi guys,

thanks for all your help in getting this going. I reduced my graphics to one screen on1080p and the sim is loading now. I will need a more powerful setup but at least I know it works.

Brían

carlosrisma commented 4 months ago

Hi, glad to hear that in the end it works, indeed the link we were using in our script to download CARLA is not working anymore so we will update it. For what regards your setup, we recommend a dedicated GPU with 6-8GB of memory, on a integrated GPU it may run but it will be with very poor performance and in the long term it could be harmful for your system.