|
sas
Modularised monitoring, logging, and control of robots.
|
Builds a SerialManipulatorSimulatorFriendly from an SDF model. More...
#include <SdfSerialManipulatorLoader.h>
Public Member Functions | |
| SdfManipulatorResult | LoadFromFile (const std::string &path, const std::string &model_scope=std::string()) const |
| Load a serial manipulator from an SDF model or world file. | |
| SdfManipulatorResult | LoadFromSdfFile (const std::string &path) const |
| Parse an SDF model file and build the kinematic model. | |
| SdfManipulatorResult | LoadFromModel (const sdf::Model *model) const |
| Build the kinematic model from an already-loaded SDF model. | |
Builds a SerialManipulatorSimulatorFriendly from an SDF model.
The loader expects a strictly serial kinematic chain: a base (the model's canonical) link, then a sequence of joints each connecting the previous link to a new link, every joint acting about the +z axis of its joint frame (so every actuation is RZ for revolute/continuous joints and TZ for prismatic joints). Non-serial topologies, unsupported joint types, or off-axis actuation axes raise std::runtime_error.
| SdfManipulatorResult sas_robot_driver_gazebo::SdfSerialManipulatorLoader::LoadFromFile | ( | const std::string & | path, |
| const std::string & | model_scope = std::string() ) const |
Load a serial manipulator from an SDF model or world file.
This is the recommended entry point. It transparently handles both Gazebo-SDF files:
Relative URIs are resolved against the directory of path, so the file's location is sufficient (no current-directory dependency).
| path | Path to a Gazebo-SDF model or world file. |
| model_scope | Optional "::"-separated chain of model names (from a top-level model in the world down to the target) that selects which model to load. Empty: automatic detection (the single model in the tree that has both links and joints). If several candidate models exist, the most deeply nested one is used and result.source_scope reports the selection; pass model_scope to disambiguate explicitly. |
| std::runtime_error | if the file cannot be parsed, no kinematic model is found, model_scope does not match, the selected model is not a serial manipulator, or a joint does not act about +z. |
| SdfManipulatorResult sas_robot_driver_gazebo::SdfSerialManipulatorLoader::LoadFromModel | ( | const sdf::Model * | model | ) | const |
Build the kinematic model from an already-loaded SDF model.
| model | Pointer to a loaded sdf::Model (must not be null). |
| std::runtime_error | on structural or actuation violations. |
| SdfManipulatorResult sas_robot_driver_gazebo::SdfSerialManipulatorLoader::LoadFromSdfFile | ( | const std::string & | path | ) | const |
Parse an SDF model file and build the kinematic model.
| path | Path to a Gazebo-SDF file whose <model> is a serial manipulator. |
| std::runtime_error | if the file cannot be parsed, is not a serial manipulator, or a joint does not act about the +z axis. |