sas
Modularised monitoring, logging, and control of robots.
Loading...
Searching...
No Matches
SdfSerialManipulatorLoader.h
Go to the documentation of this file.
1/*
2# Copyright (c) 2012-2026 Murilo Marques Marinho
3#
4# This file is part of sas_robot_driver_gazebo.
5#
6# sas_robot_driver_gazebo is free software: you can redistribute it and/or modify
7# it under the terms of the GNU Lesser General Public License as published by
8# the Free Software Foundation, either version 3 of the License, or
9# (at your option) any later version.
10#
11# sas_robot_driver_gazebo is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU Lesser General Public License for more details.
15#
16# You should have received a copy of the GNU Lesser General Public License
17# along with sas_robot_driver_gazebo. If not, see <https://www.gnu.org/licenses/>.
18*/
19
20#pragma once
44
45#include <string>
46#include <vector>
47
48#include <Eigen/Dense>
49
50#include <gz/math/Pose3.hh>
51#include <sdf/Model.hh>
52#include <sdf/World.hh>
53
54#include <dqrobotics/DQ.h>
55
57
59{
60
69{
72
74 std::vector<std::string> joint_names;
75
77 std::vector<std::string> link_names;
78
80 std::vector<std::string> actuation_type_names;
81
83 std::vector<DQ_robotics::DQ> offsets_before;
84
86 std::vector<DQ_robotics::DQ> offsets_after;
87
89 Eigen::VectorXd lower_limits;
90
92 Eigen::VectorXd upper_limits;
93
95 std::string source_path;
96
105 std::string source_scope;
106};
107
119{
120public:
153 SdfManipulatorResult LoadFromFile(const std::string& path, const std::string& model_scope = std::string()) const;
154
162 SdfManipulatorResult LoadFromSdfFile(const std::string& path) const;
163
170 SdfManipulatorResult LoadFromModel(const sdf::Model* model) const;
171};
172
173} // namespace sas_robot_driver_gazebo
A serial manipulator whose joints carry explicit pre/post offsets.
Definition serial_manipulator_simulator_friendly.hpp:58
Builds a SerialManipulatorSimulatorFriendly from an SDF model.
Definition SdfSerialManipulatorLoader.h:119
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.
Definition SdfSerialManipulatorLoader.cc:207
SdfManipulatorResult LoadFromSdfFile(const std::string &path) const
Parse an SDF model file and build the kinematic model.
Definition SdfSerialManipulatorLoader.cc:274
SdfManipulatorResult LoadFromModel(const sdf::Model *model) const
Build the kinematic model from an already-loaded SDF model.
Definition SdfSerialManipulatorLoader.cc:300
Definition SdfSerialManipulatorLoader.h:59
A serial-manipulator kinematics model with configurable per-joint offsets and actuation types.
Result of loading a serial manipulator from SDF.
Definition SdfSerialManipulatorLoader.h:69
std::string source_scope
Name of the kinematic model used to build the result.
Definition SdfSerialManipulatorLoader.h:105
std::vector< DQ_robotics::DQ > offsets_before
Per-joint pre-actuation offset DQs, in chain order.
Definition SdfSerialManipulatorLoader.h:83
std::vector< DQ_robotics::DQ > offsets_after
Per-joint post-actuation offset DQs, in chain order.
Definition SdfSerialManipulatorLoader.h:86
std::string source_path
Path of the SDF file the model was loaded from.
Definition SdfSerialManipulatorLoader.h:95
std::vector< std::string > joint_names
Name of each SDF joint, in chain order (parent -> child).
Definition SdfSerialManipulatorLoader.h:74
Eigen::VectorXd lower_limits
Lower joint limits, in chain order.
Definition SdfSerialManipulatorLoader.h:89
Eigen::VectorXd upper_limits
Upper joint limits, in chain order.
Definition SdfSerialManipulatorLoader.h:92
std::vector< std::string > actuation_type_names
Actuation type string per joint: "RZ" or "TZ".
Definition SdfSerialManipulatorLoader.h:80
marinholab::sas::core::modeling::SerialManipulatorSimulatorFriendly model
The constructed model.
Definition SdfSerialManipulatorLoader.h:71
std::vector< std::string > link_names
Name of each SDF child link, in chain order.
Definition SdfSerialManipulatorLoader.h:77