Closed gsohan closed 3 years ago
This refresh signal is not useful for gathering sensor data, it just indicates that the environment has changed. The sensor models themselves do not emit any signals at the moment, which could be used to record statistics. Feel free to extend them, though.
Have a look at the EnvmodPrinter
service, which queries the local environment model. You can easily record vectors with sensor data or emit signals for @statistic
from a similar service.
A) at the moment detected objects are reported as EnvironmentModelObject
, i.e. any type of vehicle. It should be possible without too much effort to add static obstacles like trees and buildings to the list of detected objects. So far, we had simply no need for these objects types in our use cases.
B) Yes, see EnvironmentModelObject
for the available attributes including the VehicleDataProvider
. Actually, you can retrieve more attributes in Artery than with a real sensor. It is up to you to limit yourself realistically ;-)
Thank you so much for the information. I will start working on it.
Hi Riebl, I am still having trouble in recording the sensor data. I am using cOutVector to record the sensor vector data. I have added the following lines in ../artery/envmod/service/EnvmodPrinter.cc
The build runs fine but I don't see any vector record with name 'sensorVector' or id. I don't know if cOutVector is a correct way to record the sensor data or if there is another way to record the sensor data in vector file. Your help will be highly appreciated.
Thank you so much!
You have to assign a name to your cOutVector
either by passing the name to its constructor or calling its setName
method before any record
call.
Hi Riebl, Thank you for the quick response. I was able to record the vector data for PoliceService.cc (for highway_police scenario). Actually, I wanted to record the vector data from PoliceServiceEnvmod.cc, but i was not able to do so. I checked the code and it seems cmake is not running the storyboard and envmod code. I went to build directory, and set the "With_envmod" variable to "ON" (in CMakeCache.txt); but still I didnot get the result.
How to enable PoliceServiceEnvmod.cc in cmake build for highway_police scenario? (I havenot modified the default example code) Your suggestions will be highly appreciated.
Thank you so much!
As you have already figured out, PoliceServiceEnvmod.cc is compiled only if the CMake variable WITH_ENVMOD
(all uppercase) is set. Do not forget to re-build Artery with your updated CMake configuration, i.e. invoke make
in the build directory.
Hi Riebl, Thank you again for the quick response. I set WITH_ENVMOD to ON (in artery/CMakeLists.txt). I also noticed it is already ON with option command (by default). I also checked the CMakeCache.txt in artery/build ; WITH_ENVMOD is set to 1 (by default)
Then I run make command in the artery/build directory and again runned the highway_police scenario. But still PoliceServiceEnvmod.cc code is not running. Make command is only running, PoliceService.cc and ClearLaneService.cc but envmod and story board code is not running. CMakeLists.txt in artery/scenarios/highway-police looks fine to me.
Is there anything I am doing wrong? Is there any other way to set WITH_ENVMOD variable? How to enable environment mode in highway-police scenario?
Your suggestions will be highly appreciated.
I recommend ccmake
or cmake-gui
for editing the CMake build directory configuration. Lines such as set(WITH _ENVMOD ON)
are not the intended way how you should use CMake.
Thank you so much for your suggestions. I was finally able to record the sensor data.
Hello,
I am currently working on highway_police scenario to understand the working of local environment mode sensor in Artery. I want to record the local environment sensor detection as vector file. I am working with the radar sensor similar to the example. I added one line in Car.ned file in ../artery/envmod/ as:
I want to record the sensor data from all the vehicles equipped with sensor in artery simulation. Can you please provide me some suggestions based on above code, if it is correct way to do or is there any other way to obtain sensor data in vector file format?
I have some more questions regarding sensor data: (A) Can artery radar sensor distinguish different objects such as car, tree, building? (B) Can artery radar sensor tell the position of the detected objects?
Your suggestions will be highly appreciated. Looking forward to your suggestions.
Best