Movement Sensor Component

The movement sensor component provides an API for GPS location, linear velocity and acceleration, angular velocity and acceleration and heading.

If you have hardware or software that provides such measurements, use a movement sensor component.

Configuration

To use a movement sensor and get its measurements, you need to add it to your machine’s configuration.

Go to your machine’s CONFIGURE page, and add a model that supports your sensor.

The following list shows the available sensor models. For additional configuration information, click on the model name:

Model
Description
ModelDescription
accel-adxl345The Analog Devices ADXL345 digital accelerometer
gyro-mpu6050A gyroscope/accelerometer manufactured by TDK InvenSense

API

The movement sensor API supports the following methods:

Different movement sensors provide different data, so be aware that not all of the methods below are supported by all movement sensors.

Method NameDescriptionModels That Support This Methodviam-micro-server Support
GetPositionGet the current latitude, longitude and altitude.GPS models, wheeled-odometry

GetLinearVelocityGet the current linear velocity as a 3D vector.GPS models, wheeled-odometry

GetAngularVelocityGet the current angular velocity as a 3D vector.IMU models, gyro-mpu6050, and wheeled-odometry

GetLinearAccelerationGet the current linear acceleration as a 3D vector.IMU models, accel-adxl345, and gyro-mpu6050

GetCompassHeadingGet the current compass heading in degrees.GPS models

GetOrientationGet the current orientation.IMU models, wheeled-odometry

GetPropertiesGet the supported properties of this sensor.all models

GetAccuracyGet the accuracy of the various sensors.GPS models

GetReadingsObtain the measurements/data specific to this sensor.all models

DoCommandSend or receive model-specific commands.all models

CloseSafely shut down the resource and prevent further use.all models

Troubleshooting

If your movement sensor is not working as expected, follow these steps:

  1. Check your machine logs on the LOGS tab to check for errors.
  2. Review your movement sensor model’s documentation to ensure you have configured all required attributes.
  3. Click on the TEST panel on the CONFIGURE or CONTROL tab and test if you can use the movement sensor there.

If none of these steps work, reach out to us on the Community Discord and we will be happy to help.

Next steps

For general configuration and development info, see:

To capture data from the movement sensor or use it for motion, see the following services: