...
Important note: If the IG1 is removed from the car and/or installed in another place, this calibration procedure needs to be repeated.
Web Application Programming Interface
If the webserver component of the LPNAV system is started, multiple HTTP endpoints are available to query the system status, configure its components or provide additional measurements to the system.
The base address is formed by host name and port number then the name of the endpoint is attached. For example, if the LPNAV webserver is hosted on the address 192.168.1.5 and port 9091, the base address would be:
http://192.168.1.5:9091/
Now the name of the endpoint (for example “lpglobalfusion/sensorvalues”) to form the full URL to call:
http://192.168.1.5:9091/lpglobalfusion/sensorvalues
Information Endpoints
lpglobalfusion/sensorvalues
Provides a JSON result which contains the most up-to-date values of all connected sensors.
lpglobalfusion/sensorconfig
Provides a JSON result which contains information of the configuration of all connected sensors.
lpglobalfusion/status
Provides a JSON result which contains information on the current system status and the most recent result of the position and orientation sensor fusion.
Measurement Endpoints
Measurement values can be provided to the LPNAV system via HTTP POST calls. The parameters for this wall are transferred as part of the query string.
lpglobalfusion/set_one_wheel_odometry
Provide the wheel velocity of a one wheeled vehicle to the sensor fusion.
Parameter Name | Description |
---|---|
sigma | uncertainty of wheel velocity measurement at one sigma of the standard error in meter/seconds |
wheel | wheel velocity in meter/seconds |
lpglobalfusion/set_two_wheel_odometry
Parameter Name | Description |
---|---|
sigma | uncertainty of wheel velocity measurement at one sigma of the standard error in meter/seconds |
left_wheel | wheel velocity in meter/seconds |
right_wheel |
lpglobalfusion/set_four_wheel_odometry
Parameter Name | Description |
---|---|
sigma | uncertainty of wheel velocity measurement at one sigma of the standard error in meter/seconds |
left_front_wheel | wheel velocity in meter/seconds |
right_front_wheel | |
left_rear_wheel | |
right_rear_wheel |
Example
Here is a complete example how Odometry data for a twot-wheeled vehicle can be transferred with python:
Code Block | ||
---|---|---|
| ||
from urllib.request import urlretrieve
from urllib.parse import urlencode
## fill with the last measurements from odometry
# units is meter / second
odometry_dict = {
'sigma' : 0.02,
'left_wheel': 0.4,
'right_wheel': 0.5}
qstr = urlencode(odometry_dict)
# forward the measurement to LPNAV with a POST call
# by providing an empty data dictionary, a POST call will be used
ret = urlretrieve("http://localhost:9091/lpglobalfusion/set_two_wheel_odometry?" + qstr,
data={})
|
C-Library Application Programming Interface
A C-API is provided to integrate the functionalities into your own applications. This API allows to load an existing configuration file, further configure the system, start the sensor fusion and query the current position and orientation of the vehicle.
...