Closed ashwinsarvesh closed 4 years ago
Hey You can look into these repos -- https://github.com/lgsvl/LaneFollowingSensor, https://github.com/lgsvl/ComfortSensor to know exactly how to work with sensor plugins. For camera-specific data, you would need to first figure all the variables and their ROS message types. Then convert them so that LGSVL could understand. For example in LanefollowingSensor, they use TwistStamped message type.
@dr563105 So, by variables do you mean x,y,z, pitch, yaw, roll and parameter values?
Yes. The sensor parameters from JSON, you would want your custom plugin to read, do some computation internally and send it across through ROS. For example, look at this https://github.com/lgsvl/ComfortSensor/blob/master/ComfortSensor.cs . Several parameters are fetched from JSON and some from the vehicle or other inbuilt sensors, do some calculations and then convert ROS bridge understandable format and publish via a topic. You can also have a look at the built in camera sensor in the simulator code, to understand better.
@dr563105 Sure, but if I just want to make the camera work with the LGSVL but not need any ROS communications to Apollo, then I can use "Nobridge" and enter "null" for the PUBLISH and SUBSCRIBE topics rite?
Sorry if the questions are silly, I am really new to all this
I haven't worked with Apollo. So, I don't know what you have to pass as arguments. May be someone else can answer you. However, would you not want to send those images to Apollo? CyberRT is another communication method.
@ashwinsarvesh Can you say more about what it is that you are trying to do? Are you using the built-in camera sensors and asking about the JSON sensor parameters? Or are you trying to create your own custom camera sensor in Unity (and if so, why do you feel the need to do that)? And what is the goal for the data generated by the camera sensor (if not to send it over a sensor bridge)?
@lemketron @dr563105 I am using an ADAS camera that has Lane departure warning, traffic sign recognition, forward collision warning. I should integrate this smart camera to the LGSVL so that the input data from the simulator is fed to the camera and it uses the above features on the incoming data. I do this to evaluate camera performance.
I feel it is enough to add it as a sensor plugin without communication with Apollo. But I want the confirmation from the experts here.
I haven't worked with Apollo. So, I don't know what you have to pass as arguments. May be someone else can answer you. However, would you not want to send those images to Apollo? CyberRT is another communication method.
Due to the reasons mentioned in my other comment, I do not want to send those images to Apollo.
@ashwinsarvesh Can you say more about what it is that you are trying to do? Are you using the built-in camera sensors and asking about the JSON sensor parameters? Or are you trying to create your own custom camera sensor in Unity (and if so, why do you feel the need to do that)? And what is the goal for the data generated by the camera sensor (if not to send it over a sensor bridge)?
I am trying to create my own custom plugin for the camera I have. The reason and goal are mentioned in my other comment.
You can create communication with the camera drivers to your sensor plugin
Hello,
In this link https://www.lgsvlsimulator.com/docs/sensor-plugins/ , it says that the sensor script must be added to the root of the prefab.
Kindly help me!