Extending ANVEL API



  • If I developed a sensor that I want to be available to return data via the External API, is there a straightforward way to extend the API?

    I'm assuming the only support for currently doing this is through the SendStringCommand service?



  • Depending on the type of sensor, you can use External API methods such as GetLidarPoints and GetCameraFrame.

    An example of how to get data from a Lidar sensor in python can be found at: https://wiki.anvelsim.com/index.php/Python_Example_Attached_Lidar

    And to be clear you should always check if the methods that are needed exist first in the External API before resorting to the SendStringCommand approach with ANVEL Commands.



  • I was looking along the line's if I implemented a GPS Sensor, is it possible to define my own GetGPSPoints Method in the External API.



  • You can get both the absolute position in ANVEL and then convert the Point3 object to latitude, longitude and altitude values through the ExternalAPI commands GetPoseAbs and ConvertPointToWGS84.

    This assumes your environment that you are using is correctly geographically referenced though. (which can be set in the .env file in your environment)


Log in to reply
 

Looks like your connection to ANVEL Forum was lost, please wait while we try to reconnect.