-
Hi everyone, I'm working on an autonomous vehicle simulation and am encountering an issue where the sensors (LIDAR, Radar, etc.) are not being activated correctly in my vehicle application, even though the code appears to be set up properly. What I’ve Tried:
SensorType sensorTypes[] = {SensorType.LIDAR, SensorType.RADAR_REAR, SensorType.RADAR_FRONT, SensorType.RADAR_LEFT, SensorType.RADAR_RIGHT};
((VehicleOperatingSystem)this.getOs()).activateVehicleSensors(4.0, sensorTypes); I’m logging the vehicle data in the String sensor = updatedVehicleData.getVehicleSensors().toString();
this.getLog().infoSimTime(this, "Sensor: {}", sensor); The Issue:
What I Need Help With:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @yibork, First, the API is a bit unclear here and also I think we do not cover this aspect in our documentation or tutorials. We apologize for that. To make thinks a bit more clear: What you can activate via However, SUMO provides the distance towards its leading or following vehicle, and we use this information to encode/provide it via the radar sensor. So you can activate SensorType[] sensorTypes = {SensorType.RADAR_FRONT, SensorType.RADAR_REAR};
getOs().activateVehicleSensors(100.0, sensorTypes);
For internal / performance reasons, you furthermore need to tell our coupling implementation to SUMO that it needs to pull the required information, by adding the following line to the "subscriptions": [ "roadposition", "leader" ] tl;dr: You can activate RADAR_FRONT and RADAR_REAR and retrieve the distance towards the leading vehicle, and the following vehicle respectively. For everything else you need a vehicle simulator, such as Carla, for which we cannot open-source a coupling yet. |
Beta Was this translation helpful? Give feedback.
Hi @yibork,
First, the API is a bit unclear here and also I think we do not cover this aspect in our documentation or tutorials. We apologize for that.
To make thinks a bit more clear: What you can activate via
activateVehicleSensors
depends strongly on the vehicle/traffic simulator used in the background, that is currently SUMO for all users of Eclipse MOSAIC. Since SUMO is a traffic simulator, we cannot expect it to model such vehicle sensors like radar or even LiDAR. For that you usually need a vehicle simulator with a 3D environment, such as Carla or our (commercial) simulator PHABMACS.However, SUMO provides the distance towards its leading or following vehicle, and we use this infor…