22 #include <boost/tuple/tuple.hpp> 26 #include "geometry_msgs/Pose.h" 122 bool getTiltAngleAndTiltBasePointProjected(Eigen::Vector3d &planeNormal, Eigen::Vector3d &targetViewVector, Eigen::Vector3d &target_view_center_point,
double &tilt, Eigen::Vector3d &tilt_base_point_projected);
126 Eigen::Affine3d
getTiltJointFrame(Eigen::Vector3d &planeNormal, Eigen::Vector3d &targetViewVector, Eigen::Vector3d &tilt_base_point);
130 void visualizeIKcalculation(Eigen::Vector3d &base_point, Eigen::Vector3d &base_orientation, Eigen::Vector3d &pan_joint_point, Eigen::Vector3d & pan_rotated_point, Eigen::Vector3d &tilt_base_point, Eigen::Vector3d &tilt_base_point_projected, Eigen::Vector3d &cam_point, Eigen::Vector3d &actual_view_center_point);
134 void visualizeCameraPoseCorrection(Eigen::Vector3d &base_point, Eigen::Vector3d &base_orientation, Eigen::Vector3d &pan_joint_point, Eigen::Vector3d & pan_rotated_point, Eigen::Vector3d &tilt_base_point, Eigen::Vector3d &cam_point, Eigen::Vector3d &actual_view_center_point);
146 void visualizeIKPoint(Eigen::Vector3d &point, Eigen::Vector4d &colorRGBA, std::string ns,
int id);
150 void visualizeIKArrowLarge(Eigen::Vector3d &pointStart, Eigen::Vector3d &pointEnd, Eigen::Vector4d &colorRGBA, std::string ns,
int id);
154 void visualizeIKArrowSmall(Eigen::Vector3d &pointStart, Eigen::Vector3d &pointEnd, Eigen::Vector4d &colorRGBA, std::string ns,
int id);
158 void visualizeIKArrow(Eigen::Vector3d &pointStart, Eigen::Vector3d &pointEnd, Eigen::Vector4d &colorRGBA, std::string ns, Eigen::Vector3d &scaleParameters,
int id);
double mViewPointDistance
unsigned int mIKVisualizationLastIterationCount
std::tuple< double, double > PTUConfig
MILDRobotModelWithExactIK implements a model of pan tilt unit robot where the inverse kinematic is ca...
MILDRobotModel implements a model of pan tilt unit robot.
Eigen::Affine3d tiltToPanEigen
double viewTriangleZPlane_sideB
virtual ~MILDRobotModelWithExactIK()
destructor of the MILDRobotModelWithExactIK
void visualizeIKPoint(Eigen::Vector3d &point, Eigen::Vector4d &colorRGBA, std::string ns, int id)
Eigen::Matrix< Precision, 3, 1 > SimpleVector3
Eigen::Affine3d panToBaseEigen
bool tfParametersInitialized
MILDRobotModelWithExactIK()
constructor of the MILDRobotModelWithExactIK
const unsigned int IKVisualizationMaximunIterationCount
IKRatingModulePtr ikRatingModule
void setViewPointDistance(float viewPointDistance)
Sets the distance between the desired view center point and the camera.
double acosClamped(double value)
double viewTriangleXYPlane_sideC
double viewTriangleZPlane_angleGamma
void visualizeIKArrow(Eigen::Vector3d &pointStart, Eigen::Vector3d &pointEnd, Eigen::Vector4d &colorRGBA, std::string ns, Eigen::Vector3d &scaleParameters, int id)
double getBaseAngleFromBaseFrame(Eigen::Affine3d &baseFrame)
this namespace contains all generally usable classes.
void visualizeCameraPoseCorrection(Eigen::Vector3d &base_point, Eigen::Vector3d &base_orientation, Eigen::Vector3d &pan_joint_point, Eigen::Vector3d &pan_rotated_point, Eigen::Vector3d &tilt_base_point, Eigen::Vector3d &cam_point, Eigen::Vector3d &actual_view_center_point)
void resetIKVisualization()
void visualizeIKcalculation(Eigen::Vector3d &base_point, Eigen::Vector3d &base_orientation, Eigen::Vector3d &pan_joint_point, Eigen::Vector3d &pan_rotated_point, Eigen::Vector3d &tilt_base_point, Eigen::Vector3d &tilt_base_point_projected, Eigen::Vector3d &cam_point, Eigen::Vector3d &actual_view_center_point)
void visualizeIKArrowSmall(Eigen::Vector3d &pointStart, Eigen::Vector3d &pointEnd, Eigen::Vector4d &colorRGBA, std::string ns, int id)
unsigned int mPanAngleSamplingStepsPerIteration
bool getTiltAngleAndTiltBasePointProjected(Eigen::Vector3d &planeNormal, Eigen::Vector3d &targetViewVector, Eigen::Vector3d &target_view_center_point, double &tilt, Eigen::Vector3d &tilt_base_point_projected)
Eigen::Affine3d getTiltJointFrame(Eigen::Vector3d &planeNormal, Eigen::Vector3d &targetViewVector, Eigen::Vector3d &tilt_base_point)
Eigen::Affine3d tiltToCameraEigen
void visualizeIKCameraTarget(Eigen::Vector3d &target_view_center_point, Eigen::Vector3d &target_camera_point)
Eigen::Affine3d baseToPanEigen
boost::shared_ptr< MILDRobotModelWithExactIK > MILDRobotModelWithExactIKPtr
PTUConfig calculateCameraPoseCorrection(const RobotStatePtr &sourceRobotState, const SimpleVector3 &position, const SimpleQuaternion &orientation)
Calculates the best approximation for the given camera pose from the current base position...
double viewTriangleZPlane_sideA
double viewTriangleZPlane_angleAlpha
Eigen::Affine3d panToTiltEigen
RobotStatePtr calculateRobotState(const RobotStatePtr &sourceRobotState, const SimpleVector3 &position, const SimpleQuaternion &orientation)
Calculates the inverse kinematics for the given camera pose.
void visualizeIKArrowLarge(Eigen::Vector3d &pointStart, Eigen::Vector3d &pointEnd, Eigen::Vector4d &colorRGBA, std::string ns, int id)
Eigen::Quaternion< Precision > SimpleQuaternion
float mInverseKinematicIterationAccuracy
double getPanAngleFromPanJointPose(Eigen::Affine3d &panJointFrame, MILDRobotStatePtr &robotState)