ReferenceSPQL

Robotics

Ingest robotics logs such as MCAP, and construct poses, transforms, point clouds, scenes, annotations, and sensor values.

Scalar Functions

FunctionSummary
spql.annotation.annotations_2dConstruct a spql.Annotations2D value.
spql.annotation.circle_2dConstruct a spql.Circle2D value.
spql.annotation.text_2dConstruct a spql.Text2D value.
spql.audio.audio_bufferConstruct a spql.AudioBuffer value.
spql.camera.camera_calibrationConstruct a spql.CameraCalibration value.
spql.kinematics.joint_stateConstruct a spql.JointState value.
spql.log.log_entryConstruct a spql.LogEntry value.
spql.navigation.geo_positionConstruct a spql.GeoPosition value.
spql.navigation.location_fixConstruct a spql.LocationFix value.
spql.navigation.odometryConstruct a spql.Odometry value.
spql.pointcloud.encoded_point_cloudConstruct a spql.EncodedPointCloud value.
spql.pointcloud.gridConstruct a spql.Grid value.
spql.pointcloud.laser_scanConstruct a spql.LaserScan value.
spql.pointcloud.point_cloudConstruct a spql.PointCloud value.
spql.pose.points_2dConstruct a spql.Points2D value.
spql.pose.points_3dConstruct a spql.Points3D value.
spql.pose.pose_3dConstruct a spql.Pose3D value.
spql.pose.position_2dConstruct a spql.Position2D value.
spql.pose.position_3dConstruct a spql.Position3D value.
spql.pose.quaternionConstruct a spql.Quaternion value.
spql.pose.transform_3dConstruct a spql.Transform3D value.
spql.pose.vector_2dConstruct a spql.Vector2D value.
spql.pose.vector_3dConstruct a spql.Vector3D value.
spql.scene.arrow_3dConstruct a spql.Arrow3D value.
spql.scene.box_3dConstruct a spql.Box3D value.
spql.scene.colorConstruct a spql.Color value.
spql.scene.cylinder_3dConstruct a spql.Cylinder3D value.
spql.scene.line_3dConstruct a spql.Line3D value.
spql.scene.mesh_3dConstruct a spql.Mesh3D value.
spql.scene.model_3dConstruct a spql.Model3D value.
spql.scene.scene_entity_3dConstruct a spql.SceneEntity3D value.
spql.scene.scene_entity_deletionConstruct a spql.SceneEntityDeletion value.
spql.scene.scene_update_3dConstruct a spql.SceneUpdate3D value.
spql.scene.sphere_3dConstruct a spql.Sphere3D value.
spql.scene.text_3dConstruct a spql.Text3D value.

spql.annotation.annotations_2d

Construct a spql.Annotations2D value.

  • Kind: scalar function
  • Volatility: immutable
spql.annotation.annotations_2d(circles?, points?, text?) -> spql.Annotations2D?

Parameters

NameRequiredTypeDescription
circlesnolist(spql.Circle2D)?Circle annotations in image coordinates.
pointsnolist(spql.Points2D)?Point annotations in image coordinates.
textnolist(spql.Text2D)?Text annotations in image coordinates.

spql.annotation.circle_2d

Construct a spql.Circle2D value.

  • Kind: scalar function
  • Volatility: immutable
spql.annotation.circle_2d(center, radius, thickness?, fill_color?, outline_color?, metadata?) -> spql.Circle2D?

Parameters

NameRequiredTypeDescription
centeryesspql.Position2D?Center of the circle in image pixels.
radiusyesf64?Radius of the circle in image pixels.
thicknessnof64?Outline thickness in image pixels.
fill_colornospql.Color?Color of the filled interior.
outline_colornospql.Color?Color of the circle outline.
metadatanolist(struct { key, value })?Additional key-value attributes of the annotation.

spql.annotation.text_2d

Construct a spql.Text2D value.

  • Kind: scalar function
  • Volatility: immutable
spql.annotation.text_2d(position, text, color?, background_color?, font_size?, metadata?) -> spql.Text2D?

Parameters

NameRequiredTypeDescription
positionyesspql.Position2D?Text position in image pixels.
textyesutf8?Text to display.
colornospql.Color?Text foreground color.
background_colornospql.Color?Text background color.
font_sizenof64?Font size in image pixels.
metadatanolist(struct { key, value })?Additional key-value attributes of the annotation.

spql.audio.audio_buffer

Construct a spql.AudioBuffer value.

  • Kind: scalar function
  • Volatility: immutable
spql.audio.audio_buffer(data, sample_format, sample_rate, channels) -> spql.AudioBuffer?

Parameters

NameRequiredTypeDescription
datayesbinary?PCM payload in the layout described by sample_format.
sample_formatyesutf8?FFmpeg sample format name, such as s16 or fltp.
sample_rateyesu32?Number of samples per second in each channel.
channelsyesu32?Number of audio channels.

spql.camera.camera_calibration

Construct a spql.CameraCalibration value.

  • Kind: scalar function
  • Volatility: immutable
spql.camera.camera_calibration(width, height, intrinsic, distortion_model?, distortion_coefficients?, rectification?, projection?) -> spql.CameraCalibration?

Parameters

NameRequiredTypeDescription
widthyesu32?Width of the calibrated image in pixels.
heightyesu32?Height of the calibrated image in pixels.
intrinsicyeslist(f64)?Intrinsic matrix K, 3x3 row-major.
distortion_modelnoutf8?Name of the lens distortion model, when present.
distortion_coefficientsnolist(f64)?Coefficients in the order defined by the distortion model.
rectificationnolist(f64)?Rectification matrix R, 3x3 row-major.
projectionnolist(f64)?Projection matrix P, 3x4 row-major.

spql.kinematics.joint_state

Construct a spql.JointState value.

  • Kind: scalar function
  • Volatility: immutable
spql.kinematics.joint_state(name, position?, velocity?, acceleration?, effort?) -> spql.JointState?

Parameters

NameRequiredTypeDescription
nameyesutf8?Name of the joint.
positionnof64?Angular or linear joint position, when known.
velocitynof64?Angular or linear joint velocity, when known.
accelerationnof64?Angular or linear joint acceleration, when known.
effortnof64?Torque or force applied at the joint, when known.

spql.log.log_entry

Construct a spql.LogEntry value.

  • Kind: scalar function
  • Volatility: immutable
spql.log.log_entry(level, message, name?, file?, line?) -> spql.LogEntry?

Parameters

NameRequiredTypeDescription
levelyesi32?Severity code of the log record.
messageyesutf8?Text of the log message.
namenoutf8?Name of the logger or emitting component.
filenoutf8?Source file associated with the record.
linenou32?Source line associated with the record.

spql.navigation.geo_position

Construct a spql.GeoPosition value.

  • Kind: scalar function
  • Volatility: immutable
spql.navigation.geo_position(latitude, longitude, altitude?) -> spql.GeoPosition?

Parameters

NameRequiredTypeDescription
latitudeyesf64?Latitude in degrees.
longitudeyesf64?Longitude in degrees.
altitudenof64?Altitude of the geographic position, when known.

spql.navigation.location_fix

Construct a spql.LocationFix value.

  • Kind: scalar function
  • Volatility: immutable
spql.navigation.location_fix(position, covariance?, covariance_type?, heading?, velocity?, color?, metadata?) -> spql.LocationFix?

Parameters

NameRequiredTypeDescription
positionyesspql.GeoPosition?Estimated geographic position.
covariancenolist(f64)?Covariance values for the geographic position estimate.
covariance_typenoi32?Code describing how to interpret the covariance.
headingnof64?Heading of the location estimate, when known.
velocitynospql.Vector3D?Estimated three-dimensional velocity, when known.
colornospql.Color?Display color for the location estimate.
metadatanolist(struct { key, value })?Additional key-value attributes of the estimate.

spql.navigation.odometry

Construct a spql.Odometry value.

  • Kind: scalar function
  • Volatility: immutable
spql.navigation.odometry(pose, linear_velocity?, angular_velocity?, pose_covariance?, velocity_covariance?, metadata?) -> spql.Odometry?

Parameters

NameRequiredTypeDescription
poseyesspql.Pose3D?Estimated position and orientation.
linear_velocitynospql.Vector3D?Estimated linear velocity.
angular_velocitynospql.Vector3D?Estimated angular velocity.
pose_covariancenolist(f64)?Covariance values for the pose estimate.
velocity_covariancenolist(f64)?Covariance values for the velocity estimate.
metadatanolist(struct { key, value })?Additional key-value attributes of the estimate.

spql.pointcloud.encoded_point_cloud

Construct a spql.EncodedPointCloud value.

  • Kind: scalar function
  • Volatility: immutable
spql.pointcloud.encoded_point_cloud(source, format, pose?) -> spql.EncodedPointCloud?

Parameters

NameRequiredTypeDescription
sourceyesspql.Blob?Blob containing the encoded point-cloud payload.
formatyesutf8?Point-cloud encoding name, such as pcd, las, laz or draco.
posenospql.Pose3D?Pose of the point cloud in the row's frame.

spql.pointcloud.grid

Construct a spql.Grid value.

  • Kind: scalar function
  • Volatility: immutable
spql.pointcloud.grid(column_count, cell_size, row_stride, cell_stride, fields, data, pose?) -> spql.Grid?

Parameters

NameRequiredTypeDescription
column_countyesu32?Number of cells in each grid row.
cell_sizeyesspql.Vector2D?Width and height of one cell in grid coordinates.
row_strideyesu32?Bytes from the start of one row to the start of the next.
cell_strideyesu32?Bytes from the start of one cell to the start of the next.
fieldsyeslist(struct { name, offset, dtype, count })?Field names, types and byte offsets within each packed cell.
datayesbinary?Packed cell records using the declared fields and strides.
posenospql.Pose3D?Pose of the grid in the row's frame.

spql.pointcloud.laser_scan

Construct a spql.LaserScan value.

  • Kind: scalar function
  • Volatility: immutable
spql.pointcloud.laser_scan(pose, start_angle, end_angle, ranges, intensities?) -> spql.LaserScan?

Parameters

NameRequiredTypeDescription
poseyesspql.Pose3D?Pose of the range sensor in the row's frame.
start_angleyesf64?Angle of the first range measurement.
end_angleyesf64?Angle of the last range measurement.
rangesyeslist(f64)?Range measurements ordered from start_angle to end_angle.
intensitiesnolist(f64)?Per-measurement intensities aligned with ranges.

spql.pointcloud.point_cloud

Construct a spql.PointCloud value.

  • Kind: scalar function
  • Volatility: immutable
spql.pointcloud.point_cloud(point_stride, fields, data, pose?) -> spql.PointCloud?

Parameters

NameRequiredTypeDescription
point_strideyesu32?Bytes from the start of one point to the start of the next.
fieldsyeslist(struct { name, offset, dtype, count })?Field names, types and byte offsets within each packed point.
datayesbinary?Packed point records using the declared fields and point_stride.
posenospql.Pose3D?Pose of the point cloud in the row's frame.

spql.pose.points_2d

Construct a spql.Points2D value.

  • Kind: scalar function
  • Volatility: immutable
spql.pose.points_2d(positions, colors?, radii?, labels?, topology?) -> spql.Points2D?

Parameters

NameRequiredTypeDescription
positionsyeslist(spql.Position2D)?Two-dimensional point positions in order.
colorsnolist(spql.Color)?Per-point colors aligned with positions.
radiinolist(f64)?Per-point radii aligned with positions.
labelsnolist(utf8)?Per-point text labels aligned with positions.
topologynoutf8?Connectivity description for the points.

spql.pose.points_3d

Construct a spql.Points3D value.

  • Kind: scalar function
  • Volatility: immutable
spql.pose.points_3d(positions, colors?, radii?, labels?) -> spql.Points3D?

Parameters

NameRequiredTypeDescription
positionsyeslist(spql.Position3D)?Three-dimensional point positions in order.
colorsnolist(spql.Color)?Per-point colors aligned with positions.
radiinolist(f64)?Per-point radii aligned with positions.
labelsnolist(utf8)?Per-point text labels aligned with positions.

spql.pose.pose_3d

Construct a spql.Pose3D value.

  • Kind: scalar function
  • Volatility: immutable
spql.pose.pose_3d(position, orientation) -> spql.Pose3D?

Parameters

NameRequiredTypeDescription
positionyesspql.Position3D?Position of the object in the row's frame.
orientationyesspql.Quaternion?Orientation of the object in the row's frame.

spql.pose.position_2d

Construct a spql.Position2D value.

  • Kind: scalar function
  • Volatility: immutable
spql.pose.position_2d(x, y) -> spql.Position2D?

Parameters

NameRequiredTypeDescription
xyesf64?X coordinate in the declared coordinate system.
yyesf64?Y coordinate in the declared coordinate system.

spql.pose.position_3d

Construct a spql.Position3D value.

  • Kind: scalar function
  • Volatility: immutable
spql.pose.position_3d(x, y, z) -> spql.Position3D?

Parameters

NameRequiredTypeDescription
xyesf64?X coordinate in the declared coordinate system.
yyesf64?Y coordinate in the declared coordinate system.
zyesf64?Z coordinate in the declared coordinate system.

spql.pose.quaternion

Construct a spql.Quaternion value.

  • Kind: scalar function
  • Volatility: immutable
spql.pose.quaternion(x, y, z, w) -> spql.Quaternion?

Parameters

NameRequiredTypeDescription
xyesf64?X component of the unit quaternion.
yyesf64?Y component of the unit quaternion.
zyesf64?Z component of the unit quaternion.
wyesf64?Scalar component of the unit quaternion.

spql.pose.transform_3d

Construct a spql.Transform3D value.

  • Kind: scalar function
  • Volatility: immutable
spql.pose.transform_3d(translation, rotation, scale?, parent_frame_id?, child_frame_id?) -> spql.Transform3D?

Parameters

NameRequiredTypeDescription
translationyesspql.Vector3D?Translation from the child frame into the parent frame.
rotationyesspql.Quaternion?Rotation from the child frame into the parent frame.
scalenospql.Vector3D?Scale along each child-frame axis, when supplied.
parent_frame_idnoutf8?Identifier of the frame the transform maps into.
child_frame_idnoutf8?Identifier of the frame the transform maps from.

spql.pose.vector_2d

Construct a spql.Vector2D value.

  • Kind: scalar function
  • Volatility: immutable
spql.pose.vector_2d(x, y) -> spql.Vector2D?

Parameters

NameRequiredTypeDescription
xyesf64?X component of the direction or displacement.
yyesf64?Y component of the direction or displacement.

spql.pose.vector_3d

Construct a spql.Vector3D value.

  • Kind: scalar function
  • Volatility: immutable
spql.pose.vector_3d(x, y, z) -> spql.Vector3D?

Parameters

NameRequiredTypeDescription
xyesf64?X component of the direction or displacement.
yyesf64?Y component of the direction or displacement.
zyesf64?Z component of the direction or displacement.

spql.scene.arrow_3d

Construct a spql.Arrow3D value.

  • Kind: scalar function
  • Volatility: immutable
spql.scene.arrow_3d(pose, shaft_length, shaft_diameter, head_length, head_diameter, color?) -> spql.Arrow3D?

Parameters

NameRequiredTypeDescription
poseyesspql.Pose3D?Position and orientation of the arrow.
shaft_lengthyesf64?Length of the arrow shaft in scene units.
shaft_diameteryesf64?Diameter of the arrow shaft in scene units.
head_lengthyesf64?Length of the arrow head in scene units.
head_diameteryesf64?Diameter of the arrow head in scene units.
colornospql.Color?Color of the arrow.

spql.scene.box_3d

Construct a spql.Box3D value.

  • Kind: scalar function
  • Volatility: immutable
spql.scene.box_3d(pose, size, color?) -> spql.Box3D?

Parameters

NameRequiredTypeDescription
poseyesspql.Pose3D?Position and orientation of the box.
sizeyesspql.Vector3D?Box dimensions along its local axes.
colornospql.Color?Color of the box.

spql.scene.color

Construct a spql.Color value.

  • Kind: scalar function
  • Volatility: immutable
spql.scene.color(r, g, b, a) -> spql.Color?

Parameters

NameRequiredTypeDescription
ryesf64?Red channel in the unit interval.
gyesf64?Green channel in the unit interval.
byesf64?Blue channel in the unit interval.
ayesf64?Alpha channel in the unit interval; zero is transparent.

spql.scene.cylinder_3d

Construct a spql.Cylinder3D value.

  • Kind: scalar function
  • Volatility: immutable
spql.scene.cylinder_3d(pose, size, top_scale, bottom_scale, color?) -> spql.Cylinder3D?

Parameters

NameRequiredTypeDescription
poseyesspql.Pose3D?Position and orientation of the cylinder.
sizeyesspql.Vector3D?Cylinder dimensions along its local axes.
top_scaleyesf64?Scale factor for the top cap.
bottom_scaleyesf64?Scale factor for the bottom cap.
colornospql.Color?Color of the cylinder.

spql.scene.line_3d

Construct a spql.Line3D value.

  • Kind: scalar function
  • Volatility: immutable
spql.scene.line_3d(pose, points, topology, color?, colors?, indices?, thickness?, scale_invariant?) -> spql.Line3D?

Parameters

NameRequiredTypeDescription
poseyesspql.Pose3D?Pose that places the line points in the scene.
pointsyeslist(spql.Position3D)?Line vertices in local coordinates.
topologyyesutf8?Connectivity description for the line vertices.
colornospql.Color?Shared color of the line.
colorsnolist(spql.Color)?Per-vertex colors aligned with points.
indicesnolist(u32)?Vertex indices defining connectivity.
thicknessnof64?Thickness of the line.
scale_invariantnobool?Whether line thickness stays constant as the view scale changes.

spql.scene.mesh_3d

Construct a spql.Mesh3D value.

  • Kind: scalar function
  • Volatility: immutable
spql.scene.mesh_3d(pose, vertices, indices?, color?, colors?) -> spql.Mesh3D?

Parameters

NameRequiredTypeDescription
poseyesspql.Pose3D?Pose that places the mesh in the scene.
verticesyeslist(spql.Position3D)?Mesh vertices in local coordinates.
indicesnolist(u32)?Vertex indices defining the mesh triangles.
colornospql.Color?Shared color of the mesh.
colorsnolist(spql.Color)?Per-vertex colors aligned with vertices.

spql.scene.model_3d

Construct a spql.Model3D value.

  • Kind: scalar function
  • Volatility: immutable
spql.scene.model_3d(pose, scale?, source?, media_type?, color?, override_color?) -> spql.Model3D?

Parameters

NameRequiredTypeDescription
poseyesspql.Pose3D?Position and orientation of the model.
scalenospql.Vector3D?Scale along each local model axis.
sourcenospql.Blob?Blob containing the model asset.
media_typenoutf8?Media type of the model asset.
colornospql.Color?Color applied to the model.
override_colornobool?Whether the supplied color overrides model material colors.

spql.scene.scene_entity_3d

Construct a spql.SceneEntity3D value.

  • Kind: scalar function
  • Volatility: immutable
spql.scene.scene_entity_3d(id, frame_id, lifetime_ns?, frame_locked?, arrows?, boxes?, cylinders?, spheres?, lines?, meshes?, text?, models?, metadata?) -> spql.SceneEntity3D?

Parameters

NameRequiredTypeDescription
idyesutf8?Identifier used to replace or delete this entity.
frame_idyesutf8?Frame in which the entity primitives are posed.
lifetime_nsnoi64?Lifetime of the entity in nanoseconds, when supplied.
frame_lockednobool?Whether the entity remains attached to its frame as that frame moves.
arrowsnolist(spql.Arrow3D)?Arrow primitives belonging to the entity.
boxesnolist(spql.Box3D)?Box primitives belonging to the entity.
cylindersnolist(spql.Cylinder3D)?Cylinder primitives belonging to the entity.
spheresnolist(spql.Sphere3D)?Ellipsoid primitives belonging to the entity.
linesnolist(spql.Line3D)?Line primitives belonging to the entity.
meshesnolist(spql.Mesh3D)?Mesh primitives belonging to the entity.
textnolist(spql.Text3D)?Text primitives belonging to the entity.
modelsnolist(spql.Model3D)?Model primitives belonging to the entity.
metadatanolist(struct { key, value })?Additional key-value attributes of the entity.

spql.scene.scene_entity_deletion

Construct a spql.SceneEntityDeletion value.

  • Kind: scalar function
  • Volatility: immutable
spql.scene.scene_entity_deletion(all, id?) -> spql.SceneEntityDeletion?

Parameters

NameRequiredTypeDescription
allyesbool?Whether the deletion targets every scene entity.
idnoutf8?Identifier of the entity to delete when all is false.

spql.scene.scene_update_3d

Construct a spql.SceneUpdate3D value.

  • Kind: scalar function
  • Volatility: immutable
spql.scene.scene_update_3d(entities?, deletions?) -> spql.SceneUpdate3D?

Parameters

NameRequiredTypeDescription
entitiesnolist(spql.SceneEntity3D)?Entities to add or replace in the scene.
deletionsnolist(spql.SceneEntityDeletion)?Entity deletion operations for the scene update.

spql.scene.sphere_3d

Construct a spql.Sphere3D value.

  • Kind: scalar function
  • Volatility: immutable
spql.scene.sphere_3d(pose, size, color?) -> spql.Sphere3D?

Parameters

NameRequiredTypeDescription
poseyesspql.Pose3D?Position and orientation of the ellipsoid.
sizeyesspql.Vector3D?Ellipsoid dimensions along its local axes.
colornospql.Color?Color of the ellipsoid.

spql.scene.text_3d

Construct a spql.Text3D value.

  • Kind: scalar function
  • Volatility: immutable
spql.scene.text_3d(pose, text, color?, font_size?, billboard?, scale_invariant?) -> spql.Text3D?

Parameters

NameRequiredTypeDescription
poseyesspql.Pose3D?Position and orientation of the text.
textyesutf8?Text to display.
colornospql.Color?Text color.
font_sizenof64?Size of the displayed text.
billboardnobool?Whether the text faces the viewer.
scale_invariantnobool?Whether text size stays constant as the view scale changes.
Found a problem? Edit this page or report an issue.

On this page