33 lines
752 B
C++
33 lines
752 B
C++
#ifndef ROBOT_MODEL_H
|
|
#define ROBOT_MODEL_H
|
|
|
|
#include <string>
|
|
#include <memory>
|
|
|
|
namespace robot_control {
|
|
namespace model {
|
|
|
|
class RobotModel {
|
|
public:
|
|
using Ptr = std::shared_ptr<RobotModel>;
|
|
using ConstPtr = std::shared_ptr<const RobotModel>;
|
|
|
|
RobotModel(const std::string& urdfPath);
|
|
virtual ~RobotModel() = default;
|
|
|
|
const pinocchio::Model& getModel() const { return model_; }
|
|
pinocchio::Data& getData() { return data_; }
|
|
const pinocchio::Data& getData() const { return data_; }
|
|
|
|
virtual void update(const Eigen::VectorXd& q, const Eigen::VectorXd& v) const;
|
|
|
|
protected:
|
|
pinocchio::Model model_;
|
|
mutable pinocchio::Data data_;
|
|
};
|
|
|
|
} // namespace model
|
|
} // namespace robot_control
|
|
|
|
#endif // ROBOT_MODEL_H
|