libfranka 0.21.3
FCI C++ API
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
franka::MobileModel Class Referencefinal

Calculates poses for mobile robot frames using Pinocchio. More...

#include <mobile_model.h>

Public Member Functions

 MobileModel (const std::string &urdf_model)
 Constructs a MobileModel from a URDF string.
 
 MobileModel (MobileModel &&other) noexcept
 Move-constructs a new MobileModel instance.
 
MobileModeloperator= (MobileModel &&other) noexcept
 Move-assigns this MobileModel from another MobileModel instance.
 
 ~MobileModel () noexcept
 Destructor.
 
std::array< double, 16 > pose (MobileFrame frame, const MobileJointPositions &joint_positions) const
 Gets the 4x4 pose matrix for the given mobile frame relative to the robot's base frame (URDF root link, body-fixed).
 

Static Public Attributes

static constexpr size_t kNumModules = kNumDriveModules
 Number of swerve drive modules.
 
static constexpr size_t kJointsPerModule = kJointsPerDriveModule
 Number of joints per drive module (steering + drive).
 

Detailed Description

Calculates poses for mobile robot frames using Pinocchio.

This class provides forward kinematics for mobile robots. It is constructed from a mobile robot URDF and will reject arm robot URDFs.

Note
The pose() method is RT-safe (zero heap allocation). Passive joints (casters, rocker arm) are held at their neutral configuration internally.

Constructor & Destructor Documentation

◆ MobileModel() [1/2]

franka::MobileModel::MobileModel ( const std::string &  urdf_model)
explicit

Constructs a MobileModel from a URDF string.

Parameters
[in]urdf_modelThe URDF model string describing a mobile robot.
Exceptions
ModelExceptionif the URDF describes an arm robot rather than a mobile robot.

◆ MobileModel() [2/2]

franka::MobileModel::MobileModel ( MobileModel &&  other)
noexcept

Move-constructs a new MobileModel instance.

Parameters
[in]otherOther MobileModel instance.

Member Function Documentation

◆ operator=()

MobileModel & franka::MobileModel::operator= ( MobileModel &&  other)
noexcept

Move-assigns this MobileModel from another MobileModel instance.

Parameters
[in]otherOther MobileModel instance.
Returns
MobileModel instance.

◆ pose()

std::array< double, 16 > franka::MobileModel::pose ( MobileFrame  frame,
const MobileJointPositions joint_positions 
) const

Gets the 4x4 pose matrix for the given mobile frame relative to the robot's base frame (URDF root link, body-fixed).

The pose is represented as a 4x4 matrix in column-major format. This method is RT-safe: it performs zero heap allocation.

Parameters
[in]frameThe desired drive module frame (kFrontDriveModule or kRearDriveModule).
[in]joint_positionsJoint positions for all controllable subsystems. Angles are in radians; the conversion to the internal Pinocchio representation is handled automatically.
Returns
Vectorized 4x4 pose matrix, column-major.

The documentation for this class was generated from the following file: