mirror of
https://gitlab.com/obbart/universal_robots_ros_driver.git
synced 2026-04-10 18:10:47 +02:00
Made calibration extraction a working node.
This commit is contained in:
@@ -20,6 +20,8 @@
|
||||
#include <yaml-cpp/yaml.h>
|
||||
#include <fstream>
|
||||
|
||||
namespace ur_calibration
|
||||
{
|
||||
/*!
|
||||
* \brief An internal representation of a DH-parametrized link.
|
||||
*
|
||||
@@ -152,7 +154,7 @@ public:
|
||||
{
|
||||
return robot_parameters_corrected_.toXacroProperties();
|
||||
}
|
||||
void writeToYaml(std::ofstream& ofstream) const;
|
||||
YAML::Node toYaml() const;
|
||||
|
||||
std::vector<Eigen::Matrix4d> getSimplified() const;
|
||||
|
||||
@@ -169,4 +171,5 @@ private:
|
||||
|
||||
std::vector<Eigen::Matrix4d> chain_;
|
||||
};
|
||||
} // namespace ur_calibration
|
||||
#endif // ifndef UR_RTDE_DRIVER_CALIBRATION_H_INCLUDED
|
||||
|
||||
60
ur_calibration/include/ur_calibration/calibration_consumer.h
Normal file
60
ur_calibration/include/ur_calibration/calibration_consumer.h
Normal file
@@ -0,0 +1,60 @@
|
||||
// this is for emacs file handling -*- mode: c++; indent-tabs-mode: nil -*-
|
||||
|
||||
// -- BEGIN LICENSE BLOCK ----------------------------------------------
|
||||
// -- END LICENSE BLOCK ------------------------------------------------
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
/*!\file
|
||||
*
|
||||
* \author Felix Mauch mauch@fzi.de
|
||||
* \date 2019-05-28
|
||||
*
|
||||
*/
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
#ifndef UR_CALIBRATION_CALIBRATION_CONSUMER_H_INCLUDED
|
||||
#define UR_CALIBRATION_CALIBRATION_CONSUMER_H_INCLUDED
|
||||
#include <ur_rtde_driver/comm/pipeline.h>
|
||||
|
||||
#include <ur_rtde_driver/primary/robot_state/kinematics_info.h>
|
||||
|
||||
#include <ur_calibration/calibration.h>
|
||||
|
||||
namespace ur_calibration
|
||||
{
|
||||
class CalibrationConsumer
|
||||
: public ur_driver::comm::IConsumer<ur_driver::comm::URPackage<ur_driver::primary_interface::PackageHeader>>
|
||||
{
|
||||
public:
|
||||
CalibrationConsumer();
|
||||
virtual ~CalibrationConsumer() = default;
|
||||
|
||||
virtual void setupConsumer()
|
||||
{
|
||||
}
|
||||
virtual void teardownConsumer()
|
||||
{
|
||||
}
|
||||
virtual void stopConsumer()
|
||||
{
|
||||
}
|
||||
virtual void onTimeout()
|
||||
{
|
||||
}
|
||||
|
||||
virtual bool
|
||||
consume(std::shared_ptr<ur_driver::comm::URPackage<ur_driver::primary_interface::PackageHeader>> product);
|
||||
|
||||
bool isCalibrated() const
|
||||
{
|
||||
return calibrated_;
|
||||
}
|
||||
|
||||
YAML::Node getCalibrationParameters() const;
|
||||
|
||||
private:
|
||||
bool calibrated_;
|
||||
YAML::Node calibration_parameters_;
|
||||
};
|
||||
} // namespace ur_calibration
|
||||
#endif // ifndef UR_CALIBRATION_CALIBRATION_CONSUMER_H_INCLUDED
|
||||
Reference in New Issue
Block a user