Setting up custom IMU plugin to read parameters from the user during startup

Hardware Platform: DriveWorks AGX Xavier
Software Version: Drive Software 2.2
Host Machine Version: Ubuntu 18.04.4 LTS (Bionic Beaver)
SDK Manager Version: 1.1.0.6343

Note: I am running everything I mentioned below in Linux 18.4 Host machine.

I am writing IMU-plugin for my custom CAN based IMU sensor. There are different configurations associated with my IMU that I need to setup before dwSensorPluign_Start() is called. I am looking at this IMU Plugin sample and in createSensor there is a const char* params that contains all the user parameters. Should I append my parameters (list below) and values to this string and parse it in my createSensor() and form a CAN packet to send configuration message to my IMU using dwSendCAN_sendMessage()? Or is it wrong thing to do? then the questions is, How a user of my IMU-Plugin.so is going to change the IMU configuration settings?

Configurations are:

  1. data rate - 100Hz, 50Hz, 10Hz etc
  2. packet type - Accel, Rate etc
  3. Orientation setting - 0x0000, 0x0011 etc
    and so on…

I was reading this thread but it doesn’t give more information.

Thanks in advance
Regards,
Rishit

Hello @rborad,

yes, if your IMU Plugin needs extra parameters for your IMU configuration that is the expected way to do it.
You can add as many parameters as you need as long the parameters needed by dwSAL_createSensor exists so the SAL will be created successfully.
Just remember you can send to your IMU the configuration message you want after the IMU plugin is started (after _dwSensorPlugin_start is called)

Regards

1 Like