I’m currently using ouster-sdk v0.14.0 on Windows 11 Home.
I have some data collected while driving around a parking lot, and I would like to test the SLAM functionality included in the SDK using this dataset. The data was originally in PCAP format and I’ve converted it to OSF.
I tried running the following command with the --extrinsics option:
ouster-cli source test.osf --extrinsics "0,5,0,0,0,0" slam viz
However, the command doesn’t seem to work as expected.
Could anyone clarify the correct way to use --extrinsics with an OSF file for SLAM testing?
Any guidance would be greatly appreciated.
Thank you in advance!
Options and flags, including the --extrinsics option, have to follow a command, e.g. source.
As such, the command should take the form
ouster-cli source --extrinsics "0,5,0,0,0,0" test.osf slam viz
The --extrinsics option can take many forms of input. Here’s the explanation from the help text for the source command:
-e, --extrinsics TEXT Use this arg to adjust Lidar sensor extrinsics of
the source. Supported formats:
-e extrinsics.json ; A json file containing a per
sensor extrinsics
-e identity ; Use this to override any stored
extrinsics with identity matrix
-e X,Y,Z,R,P,Y ; 'X Y Z' for position (meters),
'R P Y' represent euler angles (deg)
-e X,Y,Z,QX,QY,QZ,QW ; 'X Y Z' for position
(meters), 'QX, QY QZ, QW' represent a quaternion
-e n1,n2,..,n16 ; 16 float representing a 2D
array in a row-major order
If more than one sensor is present in the source
and this argument is used then the same
extrinsics will be applied to all sensors except
when using an extrinsics file.
I hope this helps! Please let me know if you have any further questions.
@tom
Hi Tom!
Thank you for your previous response — it was very helpful, and I was able to get it working successfully.
I would now like to test some of the other options, particularly the use of -e extrinsics.json. It seems that this file cannot be generated directly by the SDK, so I would like to create it manually.
Specifically, I am planning to connect and use three to four sensors simultaneously, and I understand that an extrinsics.json file is required for this configuration. However, I am unsure of the exact format and structure this file should follow.
Could you kindly share the correct format or a sample of how the extrinsics.json file should be structured?
I have a question regarding the -e, --extrinsics TEXT option in ouster-cli. According to the documentation, it supports both -e X,Y,Z,R,P,Y and -e X,Y,Z,QX,QY,QZ,QW formats. However, in the sample file you shared, the values are represented as "q_w", "q_x", "q_y", and "q_z".
I understand that these represent a quaternion, but I am unsure how to correctly use them. Although there are many calculators that can convert Euler angles to quaternions, the resulting angles do not seem to align properly. Could you please explain the meaning of "q_w", "q_x", "q_y", and "q_z"?
Additionally, is it mandatory to use quaternions in extrinsics.json, or Instead, is it possible to use Euler angles from a json file?
Additionally, is it mandatory to use quaternions in extrinsics.json
Yes, unfortunately the extriniscs.json expects transforms in the form of a quaternion.
The “q_x", "q_y", and "q_z" are the imaginary parts of the quaternion (think of it as the axis or rotation) while “q_w” is the real part (how much rotation around the axis). Think of a quaternion as a rotation around an axis defined by the q_x, q_y, q_z and q_w representing the rotation amount around this axis.
You can use an online calculator or the scipy python package to convert between euler angles and quaternions.