Skip to main content

Module model_library

Module model_library 

Source
Expand description

Downloading and loading the FCI v5 (Franka Emika Robot, FER) model library.

model_library::load_from_robot exists in every configuration so that callers need no cfg of their own; the dlopen-based backend behind it is the default-on model-library cargo feature, which pulls in libloading. Without that feature the crate builds with the URDF-based native_backend only and load_from_robot reports a crate::FrankaError::Model. Downloading the FCI v5 model library from the robot (LoadModelLibrary).

Port of franka::LibraryDownloader (src/library_downloader.{h,cpp}, libfranka 0.9.2). On FCI v5 the robot has no URDF to hand out; instead it serves a compiled model for the architecture and operating system the client asks for, and libfranka dlopens it. The download is a single command on the ordinary TCP command socket:

  • request: u8 architecture, u8 system (2 bytes),
  • response: u8 status, followed by the shared object as the message tail (header.size - 13 bytes: the 12-byte command header plus the status byte are subtracted).

load_from_robot performs that exchange and hands the bytes to SoModelBackend::from_bytes; the offline entry points crate::model::Model::from_model_library_bytes and crate::model::Model::from_model_library_path skip the network.

Functions§

load_from_robot
Downloads the robot’s model library over network and builds a Model.