3 - Software Development for the olixSense™ X2 Ultra
Software Development for the olixSense™ X2 Ultra
This page combines the datasheet-defined X2-series interface with firmware-specific integration examples. Confirm optional parameter names and advanced settings against the installed firmware.
Specification source: Official olixSense™ X2 Ultra datasheet, Rev. 3.7, OLV-X2U-DS-0001, 19 October 2026. Connectivity: pages 7–8; configuration: page 9.
The examples below use the default component type olixSense and namespace id001. If the namespace is changed in the WebGUI, replace id001 with the configured namespace.
Connection and power
Use the approved M12-to-RJ45 cable. Secure the M12 sensor connector and connect RJ45 to an IEEE 802.3af PoE switch or injector. The specified PoE input is 37–57 V DC with end-span / mid-span support. Do not treat power-stage capacity as device consumption; use the order-specific connection drawing.
For initial setup, place the host on the sensor’s subnet with a unique address. The default sensor address is 192.168.7.100. Use the commissioned address after setup.
Quick Start
Source ROS 2 on your computer or on the device:
source /opt/ros2/humble/install/setup.bash
List nodes and topics:
ros2 node list
ros2 topic list
Read the main IMU stream:
ros2 topic echo /olive/olixSense/x2/id001/imu --qos-reliability best_effort
For high publish rates, use Best Effort QoS when possible. Reliable QoS is useful when every sample matters, but it can add latency or backpressure on slow networks.
ROS 2 Names
Node Names
| Node | Default ROS 2 node name | Purpose |
|---|---|---|
| Manager | /olive_olixSense_id001_manager |
Device configuration, services, restart, WebGUI bridge |
| System | /olive_olixSense_id001_system |
System status and network/device information |
| IMU | /olive_olixSense_id001_imu |
IMU sensing, fusion, calibration, and data publishing |
Default Topic Rule
Default topics use this pattern:
/olive/<component_type>/x2/<namespace>/<publisher_name>
For the default X2-series configuration:
/olive/olixSense/x2/id001/<publisher_name>
Current Topics
| Topic | Message type | Published by | Notes |
|---|---|---|---|
/olive/olixSense/x2/id001/imu |
sensor_msgs/msg/Imu |
IMU | Main fused IMU output. Contains orientation, angular velocity, and linear acceleration. |
/olive/olixSense/x2/id001/acceleration |
geometry_msgs/msg/AccelStamped |
IMU | Gravity-compensated acceleration. |
/olive/olixSense/x2/id001/velocity |
geometry_msgs/msg/TwistStamped |
IMU | Integrated velocity estimate; use external aiding for sustained velocity estimation. |
/olive/olixSense/x2/id001/magneticfield |
sensor_msgs/msg/MagneticField |
IMU | Magnetic field in tesla; auxiliary stream in IMU mode. Availability follows the operating mode. |
/olive/olixSense/x2/id001/temperature |
sensor_msgs/msg/Temperature |
IMU | Sensor temperature. |
/olive/olixSense/x2/id001/status |
diagnostic_msgs/msg/DiagnosticStatus |
System | Device/system status. |
/tf |
tf2_msgs/msg/TFMessage |
IMU | Only when TF publishing is enabled. |
Debug builds or debug mode may publish extra topics such as feedback, imu_1, imu_2, imu_3, imu_4, or imu_5. These are intended for diagnostics and are not the normal integration interface.
Topic Configuration
The WebGUI Topics page can override the main user-facing topic names. Topic changes are stored in:
launch_config_manager.yaml
node.topic_publishers
Configurable publishers:
| Node | Publisher keys |
|---|---|
system |
status |
imu |
imu, temperature, velocity, magneticfield, acceleration |
Each publisher entry has:
| Key | Type | Meaning |
|---|---|---|
publisher_name |
string | Internal/display name for the publisher |
use_user_defined |
bool | false uses the Olive default topic rule; true uses user_topic |
user_topic |
string | Full ROS 2 topic path, for example /my_robot/imu/data |
Topic overrides require a device/service restart before all publishers use the new names.
Services
| Service | Type | Description |
|---|---|---|
/olive/olixSense/x2/id001/setBias |
std_srvs/srv/Trigger |
Calibrate bias offsets. Keep the device still while this runs. |
/olive/olixSense/x2/id001/setZeroQuaternion |
std_srvs/srv/Trigger |
Set the current orientation as the local zero reference. |
/olive/olixSense/x2/id001/reboot |
std_srvs/srv/Trigger |
Reboot the device. |
/olive/olixSense/x2/id001/restartDCMServices |
std_srvs/srv/Trigger |
Restart DCM services. |
/olive/olixSense/x2/id001/standby |
std_srvs/srv/SetBool |
Enable or disable standby behavior. |
Examples:
ros2 service call /olive/olixSense/x2/id001/setBias std_srvs/srv/Trigger {}
ros2 service call /olive/olixSense/x2/id001/setZeroQuaternion std_srvs/srv/Trigger {}
Operating Modes
The IMU can run in two main modes:
| Mode | Use when | Notes |
|---|---|---|
AHRS |
You need magnetometer-aided heading with configurable local zero. | Acceleration range is ±4 g. Magnetometer data is included in the orientation solution; calibrate in the installed environment. |
IMU |
You need inertial-relative orientation and configurable accelerometer range. | Selectable acceleration ranges: ±2, ±4, ±8, ±16 g. Magnetometer data is excluded from the orientation solution. |
Change the mode from the WebGUI IMU debug page. A service restart is required.
Coordinate Systems
The coordinate system is configured from the WebGUI IMU debug page and stored in launch_config_imu.yaml under:
node:
coordinate_system: FLU_LEGACY
Available modes:
| Mode | Meaning | Notes |
|---|---|---|
FLU_LEGACY |
Legacy frame behavior | Default for compatibility with existing integrations. |
FLU |
ROS-style Forward, Left, Up linear frame | Z is converted from the legacy sensor convention. |
FRD |
Forward, Right, Down linear frame | Y and Z signs are adjusted from FLU. Common in flight-control integrations. |
For new ROS integrations, use FLU unless your stack expects FRD. Keep FLU_LEGACY if you already have deployed software calibrated against the older behavior.
Acceleration Sensitivity
Acceleration sensitivity is configured from the WebGUI IMU debug page:
node:
sensor_acc_g: 4g
Options are 2g, 4g, 8g, and 16g.
Important behavior:
- In
AHRSmode, the effective range is fixed to4gfor stable orientation behavior. - In
IMUmode, the selected range is applied after restart. - Lower ranges provide finer sensitivity for small motion.
- Higher ranges handle stronger acceleration without saturation.
- If your data clips during fast motion or impact, increase the range.
- If your data is noisy for small motion, use a lower range and tune filtering.
IMU JSON Socket Export
The main IMU stream can be exported as JSON over UDP or TCP. This is useful for applications that do not use ROS 2, such as PLC gateways, game engines, web services, data loggers, or lightweight scripts.
The X2 device acts as the socket server. Your computer, robot controller, or application connects to the X2 device. The X2 does not open an outgoing connection to your computer.
Enable Socket Export
Open the WebGUI, go to the IMU debug page, then set:
| Setting | Meaning |
|---|---|
| Enable | Turns JSON socket export on or off. |
| Protocol | Selects UDP or TCP. |
| Port | The port where the X2 listens. Default is 5600. |
Apply the setting and restart the device service when the WebGUI asks for it.
The setting is stored in launch_config_imu.yaml:
node:
socket_export:
enabled: true
protocol: UDP
port: 5600
What Data Is Sent
Each payload contains the same main IMU information as the ROS 2 sensor_msgs/msg/Imu output:
| JSON field | Meaning |
|---|---|
schema |
Payload schema version. Current value is olive_imu.v1. |
frame_id |
Frame ID used by the IMU output, for example base_link. |
stamp.sec, stamp.nanosec |
ROS-style timestamp. |
orientation |
Quaternion orientation: x, y, z, w. |
orientation_covariance |
9-value covariance array. |
angular_velocity |
Angular velocity in rad/s. |
angular_velocity_covariance |
9-value covariance array. |
linear_acceleration |
Linear acceleration in m/s^2. |
linear_acceleration_covariance |
9-value covariance array. |
Example payload:
{
"schema": "olive_imu.v1",
"frame_id": "base_link",
"stamp": { "sec": 0, "nanosec": 0 },
"orientation": { "x": 0, "y": 0, "z": 0, "w": 1 },
"orientation_covariance": [0,0,0,0,0,0,0,0,0],
"angular_velocity": { "x": 0, "y": 0, "z": 0 },
"angular_velocity_covariance": [0,0,0,0,0,0,0,0,0],
"linear_acceleration": { "x": 0, "y": 0, "z": 0 },
"linear_acceleration_covariance": [0,0,0,0,0,0,0,0,0]
}
TCP Client
Use TCP when you want a stream connection and simple line-by-line parsing. Each IMU sample is sent as one newline-delimited JSON object.
Quick test:
nc <device-ip> 5600
Python TCP example:
import json
import socket
HOST = "192.168.7.100" # X2 device IP
PORT = 5600
with socket.create_connection((HOST, PORT), timeout=5) as sock:
file = sock.makefile("r")
for line in file:
msg = json.loads(line)
q = msg["orientation"]
acc = msg["linear_acceleration"]
gyro = msg["angular_velocity"]
print(
"q=({x:.4f}, {y:.4f}, {z:.4f}, {w:.4f}) "
"acc=({ax:.3f}, {ay:.3f}, {az:.3f}) "
"gyro=({gx:.3f}, {gy:.3f}, {gz:.3f})".format(
x=q["x"], y=q["y"], z=q["z"], w=q["w"],
ax=acc["x"], ay=acc["y"], az=acc["z"],
gx=gyro["x"], gy=gyro["y"], gz=gyro["z"],
)
)
UDP Client
Use UDP when you want lower overhead and can tolerate packet loss. UDP has no connection handshake, so the client must first send any small packet to the X2. This tells the X2 where to send IMU packets back.
Quick test:
echo hello | nc -u <device-ip> 5600
Python UDP example:
import json
import socket
HOST = "192.168.7.100" # X2 device IP
PORT = 5600
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.settimeout(5)
# Register this client with the X2. The content is not important.
sock.sendto(b"hello", (HOST, PORT))
while True:
data, _ = sock.recvfrom(65535)
msg = json.loads(data.decode("utf-8"))
q = msg["orientation"]
acc = msg["linear_acceleration"]
gyro = msg["angular_velocity"]
print(
"q=({x:.4f}, {y:.4f}, {z:.4f}, {w:.4f}) "
"acc=({ax:.3f}, {ay:.3f}, {az:.3f}) "
"gyro=({gx:.3f}, {gy:.3f}, {gz:.3f})".format(
x=q["x"], y=q["y"], z=q["z"], w=q["w"],
ax=acc["x"], ay=acc["y"], az=acc["z"],
gx=gyro["x"], gy=gyro["y"], gz=gyro["z"],
)
)
Choosing UDP or TCP
| Protocol | Choose it when | Tradeoff |
|---|---|---|
UDP |
You need low overhead and can accept dropped samples. | Packets can be lost or arrive unevenly. Your client must send one registration packet first. |
TCP |
You want a reliable stream and simple newline-delimited JSON parsing. | If the receiver is slow, TCP can add latency or backpressure. |
For high-rate real-time visualization or control, start with UDP. For logging, debugging, or simple integrations, TCP is often easier.
Runtime Parameters
The WebGUI Parameter page is the recommended way to edit runtime parameters. It shows the active profile values and writes changes to the running ROS 2 parameter service when the target node is available.
CLI examples:
ros2 param list /olive_olixSense_id001_imu
ros2 param set /olive_olixSense_id001_imu publish_rate 200
The Parameter page also protects the user experience after OTA/service restart: if a target node is not available yet, the write is rejected and the WebGUI restores the displayed value.
Datasheet output configuration
| Control | Range / options | Default / behavior |
|---|---|---|
| Main IMU publish-rate setting | 0–1,000 Hz | 100 Hz |
| Auxiliary publish rate | 1–200 Hz | 100 Hz |
| System status rate | 0–10 Hz | 1 Hz |
| Acceleration / gyro low-pass | 0–500 Hz setting | 8 Hz; 0 disables the cutoff filter |
| Acceleration / gyro EMA gain | 0–1 | 0.92 |
| Publisher QoS | Best effort / reliable | Best effort |
| Operating modes | IMU / AHRS | Inertial-relative / magnetometer-aided fusion |
| Application profiles | Drone / Mobile Robot / Humanoid / Raw | Profile-based configuration |
| Orientation zero | At startup / service command | Defines the local orientation reference |
Publication rate and measurement bandwidth are configured separately. Maximum setting is not guaranteed sustained throughput. The acceleration / gyro EMA and low-pass values above are the datasheet defaults; verify the active profile after configuration.
Advanced firmware parameters
The datasheet does not specify numeric defaults or ranges for the advanced fields below. Names and availability depend on firmware. Inspect the active device configuration rather than treating former profile-specific values as model specifications.
| Parameter | Type | Purpose |
|---|---|---|
enable_tf_publisher |
bool | Enables /tf output. |
enable_startup_zero_quaternion |
bool | Zeros orientation at startup for a local reference. |
gyro_zero_cutoff_threshold |
double | Clips small angular rates to zero. |
acc_scale |
double | Global accelerometer output scale. |
gyro_scale |
double | Global gyroscope output scale. |
fusion_acc_output_time_constant_sec |
double | Smoothing time constant for fused acceleration output. |
fusion_acc_correction_time_constant_sec |
double | Long-term acceleration correction speed. |
fusion_acc_temperature_step_gain |
double | Extra acceleration correction during temperature changes. |
fusion_acc_base_variance |
double | Baseline acceleration variance for fusion weighting. |
fusion_acc_outlier_gate |
double | Acceleration outlier rejection gate. |
fusion_acc_max_correction_alpha |
double | Maximum acceleration correction step per cycle. |
fusion_gyro_output_time_constant_sec |
double | Smoothing time constant for fused gyro output. |
fusion_gyro_correction_time_constant_sec |
double | Long-term gyro correction speed. |
fusion_gyro_temperature_step_gain |
double | Extra gyro correction during temperature changes. |
fusion_gyro_base_variance |
double | Baseline gyro variance for fusion weighting. |
fusion_gyro_outlier_gate |
double | Gyro outlier rejection gate. |
fusion_gyro_max_correction_alpha |
double | Maximum gyro correction step per cycle. |
mag_cutoff_frequency |
double | Magnetometer low-pass cutoff. |
mag_ema_gain |
double | Magnetometer EMA gain. |
fusion_gain |
double | Fusion beta gain. Higher is more responsive; lower is smoother. |
linear_acc_zero_cutoff_threshold |
double | Clips small gravity-compensated acceleration values to zero. |
System Parameters
| Name | Type | Default | Range | What it does |
|---|---|---|---|---|
frequency |
int | 1 |
0..10 Hz |
System status publish rate. |
Parameter Profiles
X2-series IMU profiles are selected from the WebGUI IMU debug page:
| Profile | Typical use |
|---|---|
drone |
Faster response for aerial or dynamic motion; select the appropriate active profile. |
mobile_robot |
Ground robot motion with more conservative filtering. |
humanoid |
Body-mounted or walking motion. |
raw |
Less processed output for users who want to filter downstream. |
Changing the profile updates the active IMU parameter file and requires a service restart.
Calibration
Bias Calibration
Use setBias or the WebGUI calibration action when the device is completely still. Place the device in its normal mounting orientation before starting calibration.
ros2 service call /olive/olixSense/x2/id001/setBias std_srvs/srv/Trigger {}
Magnetic Calibration
For AHRS operation, calibrate in the installed environment and check for magnetic disturbances. Magnetometer data is excluded from the orientation solution in IMU mode.
Zero Orientation
Use setZeroQuaternion when the current physical orientation should become the local zero orientation.
ros2 service call /olive/olixSense/x2/id001/setZeroQuaternion std_srvs/srv/Trigger {}
Practical Notes
- Use
/olive/olixSense/x2/id001/imufor most integrations. - Use
accelerationwhen you need gravity-compensated acceleration as a separate message. - Use
velocityas a short-term estimate only; use external aiding for sustained velocity estimation. - At high publish rates, prefer Best Effort QoS and keep subscribers lightweight.
- Use JSON socket export when the receiving application does not use ROS 2.
- If a parameter write fails immediately after OTA or service restart, wait for the target node to come back and try again. The WebGUI will restore the previous value when a write is not applied.
Measurement ranges and performance reference
| Parameter | Range / specification | Condition |
|---|---|---|
| Acceleration | ±2, ±4, ±8, ±16 g | Selectable in IMU mode; ±4 g in AHRS mode |
| Angular-rate front end | ±125, ±250, ±500, ±1,000, ±2,000 °/s | Hardware full-scale options; selectable settings depend on software configuration |
| Magnetic field | ±1,300 µT (x/y); ±2,500 µT (z), typical | Native magnetic sensing axes |
| Temperature | Internal temperature data | Diagnostic output |
For settled-angle RMSE, fused noise and stability, see technical specifications. These performance figures are engineering estimates, with model-specific validation pending; they are not production acceptance guarantees.