Expand description
Packed, little-endian wire structs of the Franka Control Interface.
Every struct in this module is a byte-for-byte port of the corresponding C++ struct in
libfranka 0.21.2 (common/include/research_interface/**), which are declared inside
#pragma pack(push, 1). Rust equivalents are therefore #[repr(C, packed)] and use the
explicitly little-endian scalar types of [zerocopy::little_endian] so that the layout is
identical on any host. C++ bool members become u8 (0 = false, non-zero = true).
Robot messages are versioned; FCI v10 lives in robot::v10 and is re-exported as
robot. The gripper protocol (version 3) lives in gripper.
Modules§
- gripper
- Gripper wire structs, ported from
common/include/research_interface/gripper/types.h(libfranka 0.21.2). The gripper speaks the same framing as the robot but with a 10-byte header (uint16_tcommand) anduint16_tstatuses. - robot
- Robot protocol wire structs, one module per FCI version.
Structs§
- Command
Header - Robot command header (
research_interface::robot::CommandHeader).
Enums§
- Header
Layout - Which of the two protocol header layouts a TCP session frames with.
Constants§
- GRIPPER_
HEADER_ LEN - Size of the gripper
CommandHeaderin bytes. - ROBOT_
COMMAND_ PORT - Robot command TCP port (
research_interface::robot::kCommandPort). - ROBOT_
HEADER_ LEN - Size of the robot
CommandHeaderin bytes. - ROBOT_
VERSION - FCI library version implemented by this crate (
research_interface::robot::kVersion).
Functions§
- accel_
to_ f64 - Converts a wire
[[f32; 3]; 6]accelerometer block to[[f64; 3]; 6]. - f32s_
to_ f64 - Converts a wire array of little-endian
f32to[f64; N]. - f64s_
to_ f64 - Converts a wire array of little-endian
f64to[f64; N]. - f64s_
to_ wire - Converts
[f64; N]to the little-endian wire representation. - message_
payload - Returns the payload of a complete TCP message (everything after the header).
- parse_
response - Parses a response payload out of a complete TCP message.