Viper650¶
- class Viper650(self)¶
Bases:
Viper
Modelization of the ADEPT Viper 650 robot.
<unparsed image <doxmlparser.compound.docImageType object at 0x7ff6930ec550>>
The non modified Denavit-Hartenberg representation of the robot is given in the table below, where \(q_1^*, \ldots, q_6^*\) are the variable joint positions.
\[\begin{split}\begin{tabular}{|c|c|c|c|c|} \hline Joint & $a_i$ & $d_i$ & $\alpha_i$ & $\theta_i$ \\\hline 1 & $a_1$ & $d_1$ & $-\pi/2$ & $q_1^*$ \\2 & $a_2$ & 0 & 0 & $q_2^*$ \\3 & $a_3$ & 0 & $-\pi/2$ & $q_3^* - \pi$ \\4 & 0 & $d_4$ & $\pi/2$ & $q_4^*$ \\5 & 0 & 0 & $-\pi/2$ & $q_5^*$ \\6 & 0 & 0 & 0 & $q_6^*-\pi$ \\7 & 0 & $d_6$ & 0 & 0 \\\hline \end{tabular} \end{split}\]In this modelization, different frames have to be considered.
\({\cal F}_f\) : the reference frame, also called world frame
\({\cal F}_w\) : the wrist frame located at the intersection of the last three rotations, with \(^f{\bf M}_w = ^0{\bf M}_6\)
\({\cal F}_e\) : the end-effector frame located at the interface of the two tool changers, with \(^f{\bf M}_e = 0{\bf M}_7\)
\({\cal F}_c\) : the camera or tool frame, with \(^f{\bf M}_c = ^f{\bf M}_e \; ^e{\bf M}_c\) where \(^e{\bf M}_c\) is the result of a calibration stage. We can also consider a custom tool TOOL_CUSTOM and set this tool during robot initialisation or using set_eMc() .
\({\cal F}_s\) : the force/torque sensor frame, with \(d7=0.0666\) .
Default constructor. Sets the specific parameters like the Denavit-Hartenberg parameters.
Methods
Default constructor.
Overloaded function.
Get the current camera model projection type.
Get the current tool type.
Overloaded function.
This function gets the robot constant parameters from a file.
Inherited Methods
Get the robot jacobian \({^f}{\bf J}_w\) which express the velocity of the origin of the wrist frame in the robot reference frame also called fix frame.
Compute the inverse kinematics (inverse geometric model).
Return the coupling factor between join 5 and joint 6.
Compute the forward kinematics (direct geometric model) as an homogeneous matrix \({^f}{\bf M}_e\) .
Compute the inverse kinematics (inverse geometric model).
Get the geometric transformation between the end-effector frame and the force/torque sensor frame.
Get the robot jacobian \({^e}{\bf J}_e\) which gives the velocity of the origin of the end-effector frame expressed in end-effector frame.
Compute the forward kinematics (direct geometric model) as an homogeneous matrix.
Return the transformation between the wrist frame and the end-effector.
Overloaded function.
Get maximal joint values.
Overloaded function.
Get the twist transformation \(^c{\bf V}_e\) from camera frame to end-effector frame.
njoint
Get the geometric transformation between the camera frame and the end-effector frame.
Compute the transformation between the fix frame and the wrist frame.
Get the robot jacobian \({^f}{\bf J}_e\) which gives the velocity of the origin of the end-effector frame expressed in the robot reference frame also called fix frame.
Get the geometric transformation between the end-effector frame and the camera frame.
Get minimal joint values.
Operators
__annotations__
__doc__
Default constructor.
__module__
Attributes
CONST_CAMERA_FILENAME
CONST_EMC_GENERIC_WITHOUT_DISTORTION_FILENAME
CONST_EMC_GENERIC_WITH_DISTORTION_FILENAME
CONST_EMC_MARLIN_F033C_WITHOUT_DISTORTION_FILENAME
CONST_EMC_MARLIN_F033C_WITH_DISTORTION_FILENAME
CONST_EMC_PTGREY_FLEA2_WITHOUT_DISTORTION_FILENAME
CONST_EMC_PTGREY_FLEA2_WITH_DISTORTION_FILENAME
CONST_EMC_SCHUNK_GRIPPER_WITHOUT_DISTORTION_FILENAME
CONST_EMC_SCHUNK_GRIPPER_WITH_DISTORTION_FILENAME
CONST_GENERIC_CAMERA_NAME
CONST_MARLIN_F033C_CAMERA_NAME
CONST_PTGREY_FLEA2_CAMERA_NAME
CONST_SCHUNK_GRIPPER_CAMERA_NAME
TOOL_CUSTOM
TOOL_GENERIC_CAMERA
TOOL_MARLIN_F033C_CAMERA
TOOL_PTGREY_FLEA2_CAMERA
TOOL_SCHUNK_GRIPPER_CAMERA
__annotations__
defaultTool
njoint
- class ToolType(self, value: int)¶
Bases:
pybind11_object
List of possible tools that can be attached to the robot end-effector.
Values:
TOOL_MARLIN_F033C_CAMERA: Marlin F033C camera.
TOOL_PTGREY_FLEA2_CAMERA: Point Grey Flea 2 camera.
TOOL_SCHUNK_GRIPPER_CAMERA: Camera attached to the Schunk gripper.
TOOL_GENERIC_CAMERA: A generic camera.
TOOL_CUSTOM: A user defined tool.
- __init__(self)¶
Default constructor. Sets the specific parameters like the Denavit-Hartenberg parameters.
- getCameraParameters(*args, **kwargs)¶
Overloaded function.
getCameraParameters(self: visp._visp.robot.Viper650, cam: visp._visp.core.CameraParameters, image_width: int, image_height: int) -> None
Get the current intrinsic camera parameters obtained by calibration.
Warning
This method needs XML library to parse the file defined in vpViper650::CONST_CAMERA_FILENAME and containing the camera parameters.
Warning
Thid method needs also an access to the files containing the camera parameters in XML format. This access is available if VISP_HAVE_VIPER650_DATA macro is defined in include/visp3/core/vpConfig.h file.
If VISP_HAVE_VIPER650_DATA macro is defined, this method gets the camera parameters from const_camera_Viper650.xml config file.
If this macro is not defined, this method sets the camera parameters to default one.
The code below shows how to get the camera parameters of the camera attached to the robot.
#include <visp3/core/vpImage.h> #include <visp3/robot/vpRobotViper650.h> #include <visp3/robot/vpViper650.h> #include <visp3/sensor/vp1394TwoGrabber.h> int main() { vpImage<unsigned char> I(480, 640); #ifdef VISP_HAVE_DC1394 vp1394TwoGrabber g; // Acquire an image to update image structure g.acquire(I) ; #endif #ifdef VISP_HAVE_VIPER650 vpRobotViper650 robot; #else vpViper650 robot; #endif vpCameraParameters cam ; // Get the intrinsic camera parameters depending on the image size // Camera parameters are read from // /udd/fspindle/robot/Viper650/current/include/const_camera_Viper650.xml // if VISP_HAVE_VIPER650_DATA macro is defined // in vpConfig.h file try { robot.getCameraParameters (cam, I.getWidth(), I.getHeight()); } catch(...) { std::cout << "Cannot get camera parameters for image: " << I.getWidth() << " x " << I.getHeight() << std::endl; } std::cout << "Camera parameters: " << cam << std::endl; }
- Parameters:
- cam
In output, camera parameters to fill.
- image_width
Image width used to compute camera calibration.
- image_height
Image height used to compute camera calibration.
getCameraParameters(self: visp._visp.robot.Viper650, cam: visp._visp.core.CameraParameters, I: visp._visp.core.ImageGray) -> None
Get the current intrinsic camera parameters obtained by calibration.
Warning
This method needs XML library to parse the file defined in vpViper650::CONST_CAMERA_FILENAME and containing the camera parameters.
Warning
Thid method needs also an access to the files containing the camera parameters in XML format. This access is available if VISP_HAVE_VIPER650_DATA macro is defined in include/visp3/core/vpConfig.h file.
If VISP_HAVE_VIPER650_DATA macro is defined, this method gets the camera parameters from const_camera_Viper650.xml config file.
If these two macros are not defined, this method set the camera parameters to default one.
#include <visp3/core/vpImage.h> #include <visp3/robot/vpRobotViper650.h> #include <visp3/robot/vpViper650.h> #include <visp3/sensor/vp1394TwoGrabber.h> int main() { vpImage<unsigned char> I(480, 640); #ifdef VISP_HAVE_DC1394 vp1394TwoGrabber g; // Acquire an image to update image structure g.acquire(I) ; #endif #ifdef VISP_HAVE_VIPER650 vpRobotViper650 robot; #else vpViper650 robot; #endif vpCameraParameters cam ; // Get the intrinsic camera parameters depending on the image size try { robot.getCameraParameters (cam, I); } catch(...) { std::cout << "Cannot get camera parameters for image: " << I.getWidth() << " x " << I.getHeight() << std::endl; } std::cout << "Camera parameters: " << cam << std::endl; }
- Parameters:
- cam
In output, camera parameters to fill.
- I
A B&W image send by the current camera in use.
getCameraParameters(self: visp._visp.robot.Viper650, cam: visp._visp.core.CameraParameters, I: visp._visp.core.ImageRGBa) -> None
Get the current intrinsic camera parameters obtained by calibration.
Warning
This method needs XML library to parse the file defined in vpViper650::CONST_CAMERA_FILENAME and containing the camera parameters.
Warning
Thid method needs also an access to the files containing the camera parameters in XML format. This access is available if VISP_HAVE_VIPER650_DATA macro is defined in include/visp3/core/vpConfig.h file.
If VISP_HAVE_VIPER650_DATA macro is defined, this method gets the camera parameters from const_camera_Viper650.xml config file.
If these two macros are not defined, this method set the camera parameters to default one.
#include <visp3/core/vpImage.h> #include <visp3/robot/vpRobotViper650.h> #include <visp3/robot/vpViper650.h> #include <visp3/sensor/vp1394TwoGrabber.h> int main() { vpImage<vpRGBa> I(480, 640); #ifdef VISP_HAVE_DC1394 vp1394TwoGrabber g; // Acquire an image to update image structure g.acquire(I) ; #endif #ifdef VISP_HAVE_VIPER650 vpRobotViper650 robot; #else vpViper650 robot; #endif vpCameraParameters cam ; // Get the intrinsic camera parameters depending on the image size try { robot.getCameraParameters (cam, I); } catch(...) { std::cout << "Cannot get camera parameters for image: " << I.getWidth() << " x " << I.getHeight() << std::endl; } std::cout << "Camera parameters: " << cam << std::endl; }
- Parameters:
- cam
In output, camera parameters to fill.
- I
A color image send by the current camera in use.
- getCameraParametersProjType(self) visp._visp.core.CameraParameters.CameraParametersProjType ¶
Get the current camera model projection type.
- getCoupl56(self) float ¶
Return the coupling factor between join 5 and joint 6.
This factor should be only useful when motor positions are considered. Since the positions returned by the robot are joint positions which takes into account the coupling factor, it has not to be considered in the modelization of the robot.
- getForwardKinematics(self, q: visp._visp.core.ColVector) visp._visp.core.HomogeneousMatrix ¶
Compute the forward kinematics (direct geometric model) as an homogeneous matrix.
By forward kinematics we mean here the position and the orientation of the camera relative to the base frame given the six joint positions.
This method is the same than get_fMc(const vpColVector & q).
Note
See get_fMc(const vpColVector & q)
Note
See getInverseKinematics()
- Parameters:
- q: visp._visp.core.ColVector¶
A six dimension vector corresponding to the robot joint positions expressed in radians.
- Returns:
The homogeneous matrix \(^f{\bf M}_c\) corresponding to the direct geometric model which expresses the transformation between the base frame and the camera frame.
- getInverseKinematics(self, fMc: visp._visp.core.HomogeneousMatrix, q: visp._visp.core.ColVector, verbose: bool = false) int ¶
Compute the inverse kinematics (inverse geometric model).
By inverse kinematics we mean here the six joint values given the position and the orientation of the camera frame relative to the base frame.
The code below shows how to compute the inverse geometric model:
vpColVector q1(6), q2(6); vpHomogeneousMatrix fMc; vpViper robot; // Get the current joint position of the robot robot.getPosition(vpRobot::ARTICULAR_FRAME, q1); // Compute the pose of the camera in the reference frame using the // direct geometric model fMc = robot.getForwardKinematics(q1); // this is similar to fMc = robot.get_fMc(q1); // or robot.get_fMc(q1, fMc); // Compute the inverse geometric model int nbsol; // number of solutions (0, 1 to 8) of the inverse geometric model // get the nearest solution to the current joint position nbsol = robot.getInverseKinematics(fMc, q1); if (nbsol == 0) std::cout << "No solution of the inverse geometric model " << std::endl; else if (nbsol >= 1) std::cout << "Nearest solution: " << q1 << std::endl;
Note
See getForwardKinematics() , getInverseKinematicsWrist
- Parameters:
- fMc: visp._visp.core.HomogeneousMatrix¶
Homogeneous matrix \(^f{\bf M}_c\) describing the transformation from base frame to the camera frame.
- q: visp._visp.core.ColVector¶
In input, a six dimension vector corresponding to the current joint positions expressed in radians. In output, the solution of the inverse kinematics, ie. the joint positions corresponding to \(^f{\bf M}_c\) .
- verbose: bool = false¶
Add extra printings.
- Returns:
Add printings if no solution was found.The number of solutions (1 to 8) of the inverse geometric model. O, if no solution can be found.
- getInverseKinematicsWrist(self, fMw: visp._visp.core.HomogeneousMatrix, q: visp._visp.core.ColVector, verbose: bool = false) int ¶
Compute the inverse kinematics (inverse geometric model).
By inverse kinematics we mean here the six joint values given the position and the orientation of the camera frame relative to the base frame.
The code below shows how to compute the inverse geometric model:
vpColVector q1(6), q2(6); vpHomogeneousMatrix fMw; vpViper robot; // Get the current joint position of the robot robot.getPosition(vpRobot::ARTICULAR_FRAME, q1); // Compute the pose of the wrist in the reference frame using the // direct geometric model robot.get_fMw(q1, fMw); // Compute the inverse geometric model int nbsol; // number of solutions (0, 1 to 8) of the inverse geometric model // get the nearest solution to the current joint position nbsol = robot.getInverseKinematicsWrist(fMw, q1); if (nbsol == 0) std::cout << "No solution of the inverse geometric model " << std::endl; else if (nbsol >= 1) std::cout << "Nearest solution: " << q1 << std::endl;
Note
See getForwardKinematics() , getInverseKinematics()
- Parameters:
- fMw: visp._visp.core.HomogeneousMatrix¶
Homogeneous matrix \(^f{\bf M}_w\) describing the transformation from base frame to the wrist frame.
- q: visp._visp.core.ColVector¶
In input, a six dimension vector corresponding to the current joint positions expressed in radians. In output, the solution of the inverse kinematics, ie. the joint positions corresponding to \(^f{\bf M}_w\) .
- verbose: bool = false¶
Add extra printings.
- Returns:
Add printings if no solution was found.The number of solutions (1 to 8) of the inverse geometric model. O, if no solution can be found.
- getJointMax(self) visp._visp.core.ColVector ¶
Get maximal joint values.
- Returns:
A 6-dimension vector that contains the maximal joint values for the 6 dof. All the values are expressed in radians.
- getJointMin(self) visp._visp.core.ColVector ¶
Get minimal joint values.
- Returns:
A 6-dimension vector that contains the minimal joint values for the 6 dof. All the values are expressed in radians.
- getToolType(self) visp._visp.robot.Viper650.ToolType ¶
Get the current tool type.
- get_cMe(self, cMe: visp._visp.core.HomogeneousMatrix) None ¶
Get the geometric transformation between the camera frame and the end-effector frame. This transformation is constant and correspond to the extrinsic camera parameters estimated by calibration.
Note
See get_eMc()
- Parameters:
- cMe: visp._visp.core.HomogeneousMatrix¶
Transformation between the camera frame and the end-effector frame.
- get_cVe(self, cVe: visp._visp.core.VelocityTwistMatrix) None ¶
Get the twist transformation \(^c{\bf V}_e\) from camera frame to end-effector frame. This transformation allows to compute a velocity expressed in the end-effector frame into the camera frame.
\[\begin{split}^c{\bf V}_e = \left(\begin{array}{cc} ^c{\bf R}_e & [^c{\bf t}_e]_\times ^c{\bf R}_e\\{\bf 0}_{3\times 3} & ^c{\bf R}_e \end{array} \right) \end{split}\]- Parameters:
- cVe: visp._visp.core.VelocityTwistMatrix¶
Twist transformation \(^c{\bf V}_e\) .
- get_eJe(self, q: visp._visp.core.ColVector, eJe: visp._visp.core.Matrix) None ¶
Get the robot jacobian \({^e}{\bf J}_e\) which gives the velocity of the origin of the end-effector frame expressed in end-effector frame.
\[\begin{split}{^e}{\bf J}_e = \left[\begin{array}{cc} {^w}{\bf R}_f & {[{^e}{\bf t}_w}]_\times \; {^w}{\bf R}_f \\0_{3\times3} & {^w}{\bf R}_f \end{array} \right] \; {^f}{\bf J}_w \end{split}\]Note
See get_fJw()
- Parameters:
- q: visp._visp.core.ColVector¶
A six-dimension vector that contains the joint positions of the robot expressed in radians.
- eJe: visp._visp.core.Matrix¶
Robot jacobian \({^e}{\bf J}_e\) that express the velocity of the end-effector in the robot end-effector frame.
- get_eMc(self, eMc: visp._visp.core.HomogeneousMatrix) None ¶
Get the geometric transformation between the end-effector frame and the camera frame. This transformation is constant and correspond to the extrinsic camera parameters estimated by calibration.
Note
See get_cMe()
- get_eMs(self, eMs: visp._visp.core.HomogeneousMatrix) None ¶
Get the geometric transformation between the end-effector frame and the force/torque sensor frame. This transformation is constant.
- Parameters:
- eMs: visp._visp.core.HomogeneousMatrix¶
Transformation between the the end-effector frame and the force/torque sensor frame.
- get_fJe(self, q: visp._visp.core.ColVector, fJe: visp._visp.core.Matrix) None ¶
Get the robot jacobian \({^f}{\bf J}_e\) which gives the velocity of the origin of the end-effector frame expressed in the robot reference frame also called fix frame.
\[\begin{split}{^f}{\bf J}_e = \left[\begin{array}{cc} I_{3\times3} & [{^f}{\bf R}_w \; {^e}{\bf t}_w]_\times \\0_{3\times3} & I_{3\times3} \end{array} \right] {^f}{\bf J}_w \end{split}\]Note
See get_fJw
- Parameters:
- q: visp._visp.core.ColVector¶
A six-dimension vector that contains the joint positions of the robot expressed in radians.
- fJe: visp._visp.core.Matrix¶
Robot jacobian \({^f}{\bf J}_e\) that express the velocity of the end-effector in the robot reference frame.
- get_fJw(self, q: visp._visp.core.ColVector, fJw: visp._visp.core.Matrix) None ¶
Get the robot jacobian \({^f}{\bf J}_w\) which express the velocity of the origin of the wrist frame in the robot reference frame also called fix frame.
\[\begin{split}{^f}J_w = \left(\begin{array}{cccccc} J_{11} & J_{12} & J_{13} & 0 & 0 & 0 \\J_{21} & J_{22} & J_{23} & 0 & 0 & 0 \\0 & J_{32} & J_{33} & 0 & 0 & 0 \\0 & -s1 & -s1 & c1s23 & J_{45} & J_{46} \\0 & c1 & c1 & s1s23 & J_{55} & J_{56} \\1 & 0 & 0 & c23 & s23s4 & J_{56} \\\end{array} \right) \end{split}\]with
\[\begin{split}\begin{array}{l} J_{11} = -s1(-c23a3+s23d4+a1+a2c2) \\J_{21} = c1(-c23a3+s23d4+a1+a2c2) \\J_{12} = c1(s23a3+c23d4-a2s2) \\J_{22} = s1(s23a3+c23d4-a2s2) \\J_{32} = c23a3-s23d4-a2c2 \\J_{13} = c1(a3(s2c3+c2s3)+(-s2s3+c2c3)d4)\\J_{23} = s1(a3(s2c3+c2s3)+(-s2s3+c2c3)d4)\\J_{33} = -a3(s2s3-c2c3)-d4(s2c3+c2s3)\\J_{45} = -c23c1s4-s1c4\\J_{55} = c1c4-c23s1s4\\J_{46} = (c1c23c4-s1s4)s5+c1s23c5\\J_{56} = (s1c23c4+c1s4)s5+s1s23c5\\J_{66} = -s23c4s5+c23c5\\\end{array} \end{split}\]Note
See get_fJe() , get_eJe()
- Parameters:
- q: visp._visp.core.ColVector¶
A six-dimension vector that contains the joint positions of the robot expressed in radians.
- fJw: visp._visp.core.Matrix¶
Robot jacobian \({^f}{\bf J}_w\) that express the velocity of the point w (origin of the wrist frame) in the robot reference frame.
- get_fMc(*args, **kwargs)¶
Overloaded function.
get_fMc(self: visp._visp.robot.Viper, q: visp._visp.core.ColVector) -> visp._visp.core.HomogeneousMatrix
Compute the forward kinematics (direct geometric model) as an homogeneous matrix.
By forward kinematics we mean here the position and the orientation of the camera relative to the base frame given the joint positions of all the six joints.
\[^f{\bf M}_c = ^f{\bf M}_e \; ^e{\bf M}_c \]This method is the same than getForwardKinematics(const vpColVector & q).
Note
See getForwardKinematics(const vpColVector & q), get_fMe() , get_eMc()
- Parameters:
- q
Vector of six joint positions expressed in radians.
- Returns:
The homogeneous matrix corresponding to the direct geometric model which expresses the transformation between the base frame and the camera frame (fMc).
get_fMc(self: visp._visp.robot.Viper, q: visp._visp.core.ColVector, fMc: visp._visp.core.HomogeneousMatrix) -> None
Compute the forward kinematics (direct geometric model) as an homogeneous matrix.
By forward kinematics we mean here the position and the orientation of the camera relative to the base frame given the six joint positions.
\[^f{\bf M}_c = ^f{\bf M}_e \; {^e}{\bf M}_c \]Note
See get_fMe() , get_eMc()
- Parameters:
- q
Vector of six joint positions expressed in radians.
- fMc
The homogeneous matrix \(^f{\bf M}_c\) corresponding to the direct geometric model which expresses the transformation between the fix frame and the camera frame.
- get_fMe(self, q: visp._visp.core.ColVector, fMe: visp._visp.core.HomogeneousMatrix) None ¶
Compute the forward kinematics (direct geometric model) as an homogeneous matrix \({^f}{\bf M}_e\) .
By forward kinematics we mean here the position and the orientation of the end effector with respect to the base frame given the motor positions of all the six joints.
\[\begin{split}{^f}M_e = \left(\begin{array}{cccc} r_{11} & r_{12} & r_{13} & t_x \\r_{21} & r_{22} & r_{23} & t_y \\r_{31} & r_{32} & r_{33} & t_z \\\end{array} \right) \end{split}\]with
\[\begin{split}\begin{array}{l} r_{11} = c1(c23(c4c5c6-s4s6)-s23s5c6)-s1(s4c5c6+c4s6) \\r_{21} = -s1(c23(-c4c5c6+s4s6)+s23s5c6)+c1(s4c5c6+c4s6) \\r_{31} = s23(s4s6-c4c5c6)-c23s5c6 \\\\r_{12} = -c1(c23(c4c5s6+s4c6)-s23s5s6)+s1(s4c5s6-c4c6)\\r_{22} = -s1(c23(c4c5s6+s4c6)-s23s5s6)-c1(s4c5s6-c4c6)\\r_{32} = s23(c4c5s6+s4c6)+c23s5s6\\\\r_{13} = c1(c23c4s5+s23c5)-s1s4s5\\r_{23} = s1(c23c4s5+s23c5)+c1s4s5\\r_{33} = -s23c4s5+c23c5\\\\t_x = c1(c23(c4s5d6-a3)+s23(c5d6+d4)+a1+a2c2)-s1s4s5d6\\t_y = s1(c23(c4s5d6-a3)+s23(c5d6+d4)+a1+a2c2)+c1s4s5d6\\t_z = s23(a3-c4s5d6)+c23(c5d6+d4)-a2s2+d1\\\end{array} \end{split}\]Note that this transformation can also be computed by considering the wrist frame \({^f}{\bf M}_e = {^f}{\bf M}_w *{^w}{\bf M}_e\) .
#include <visp3/robot/vpViper.h> int main() { vpViper robot; vpColVector q(6); // The measured six joint positions vpHomogeneousMatrix fMe; // Transformation from fix frame to end-effector robot.get_fMe(q, fMe); // Get the forward kinematics // The forward kinematics can also be computed by considering the wrist frame vpHomogeneousMatrix fMw; // Transformation from fix frame to wrist frame robot.get_fMw(q, fMw); vpHomogeneousMatrix wMe; // Transformation from wrist frame to end-effector robot.get_wMe(wMe); // Constant transformation // Compute the forward kinematics fMe = fMw * wMe; }
- Parameters:
- q: visp._visp.core.ColVector¶
A 6-dimension vector that contains the 6 joint positions expressed in radians.
- fMe: visp._visp.core.HomogeneousMatrix¶
The homogeneous matrix \({^f}{\bf M}_e\) corresponding to the direct geometric model which expresses the transformation between the fix frame and the end effector frame.
- get_fMw(self, q: visp._visp.core.ColVector, fMw: visp._visp.core.HomogeneousMatrix) None ¶
Compute the transformation between the fix frame and the wrist frame. The wrist frame is located on the intersection of the 3 last rotations.
\[\begin{split}{^f}M_w = \left(\begin{array}{cccc} r_{11} & r_{12} & r_{13} & t_x \\r_{21} & r_{22} & r_{23} & t_y \\r_{31} & r_{32} & r_{33} & t_z \\\end{array} \right) \end{split}\]with
\[\begin{split}\begin{array}{l} r_{11} = c1(c23(c4c5c6-s4s6)-s23s5c6)-s1(s4c5c6+c4s6) \\r_{21} = -s1(c23(-c4c5c6+s4s6)+s23s5c6)+c1(s4c5c6+c4s6) \\r_{31} = s23(s4s6-c4c5c6)-c23s5c6 \\\\r_{12} = -c1(c23(c4c5s6+s4c6)-s23s5s6)+s1(s4c5s6-c4c6)\\r_{22} = -s1(c23(c4c5s6+s4c6)-s23s5s6)-c1(s4c5s6-c4c6)\\r_{32} = s23(c4c5s6+s4c6)+c23s5s6\\\\r_{13} = c1(c23c4s5+s23c5)-s1s4s5\\r_{23} = s1(c23c4s5+s23c5)+c1s4s5\\r_{33} = -s23c4s5+c23c5\\\\t_x = c1(-c23a3+s23d4+a1+a2c2)\\t_y = s1(-c23a3+s23d4+a1+a2c2)\\t_z = s23a3+c23d4-a2s2+d1\\\end{array} \end{split}\]- Parameters:
- q: visp._visp.core.ColVector¶
A 6-dimension vector that contains the 6 joint positions expressed in radians.
- fMw: visp._visp.core.HomogeneousMatrix¶
The homogeneous matrix corresponding to the transformation between the fix frame and the wrist frame (fMw).
- get_wMe(self, wMe: visp._visp.core.HomogeneousMatrix) None ¶
Return the transformation between the wrist frame and the end-effector. The wrist frame is located on the intersection of the 3 last rotations.
- Parameters:
- wMe: visp._visp.core.HomogeneousMatrix¶
The homogeneous matrix corresponding to the transformation between the wrist frame and the end-effector frame (wMe).
- init(*args, **kwargs)¶
Overloaded function.
init(self: visp._visp.robot.Viper650) -> None
Initialize the robot with the default tool vpViper650::defaultTool .
init(self: visp._visp.robot.Viper650, camera_extrinsic_parameters: str) -> None
Read files containing the constant parameters related to the robot tools in order to set the end-effector to tool transformation.
- Parameters:
- camera_extrinsic_parameters
Filename containing the camera extrinsic parameters.
init(self: visp._visp.robot.Viper650, tool: visp._visp.robot.Viper650.ToolType, projModel: visp._visp.core.CameraParameters.CameraParametersProjType) -> None
Set the constant parameters related to the robot kinematics and to the end-effector to camera transformation ( \(^e{\bf M}c\) ) corresponding to the camera extrinsic parameters. These last parameters depend on the camera and projection model in use and are loaded from predefined files or parameters.
Warning
If the macro VISP_HAVE_VIPER650_DATA is defined in vpConfig.h this function reads the camera extrinsic parameters from the file corresponding to the specified camera type and projection type. Otherwise corresponding default parameters are loaded.
Note
See init(vpViper650::vpToolType, const std::string&) , init(vpViper650::vpToolType, const vpHomogeneousMatrix&)
- Parameters:
- tool
Camera in use.
init(self: visp._visp.robot.Viper650, tool: visp._visp.robot.Viper650.ToolType, filename: str) -> None
Set the type of tool attached to the robot and transformation between the end-effector and the tool ( \(^e{\bf M}c\) ). This last parameter is loaded from a file.
The configuration file should have the form below:
# Start with any number of consecutive lines # beginning with the symbol '#' # # The 3 following lines contain the name of the camera, # the rotation parameters of the geometric transformation # using the Euler angles in degrees with convention XYZ and # the translation parameters expressed in meters CAMERA CameraName eMc_ROT_XYZ 10.0 -90.0 20.0 eMc_TRANS_XYZ 0.05 0.01 0.06
Note
See init ( vpViper650::vpToolType , vpCameraParameters::vpCameraParametersProjType ), init ( vpViper650::vpToolType , const vpHomogeneousMatrix &)
- Parameters:
- tool
Type of tool in use.
- filename
Path of the configuration file containing the transformation between the end-effector frame and the tool frame.
init(self: visp._visp.robot.Viper650, tool: visp._visp.robot.Viper650.ToolType, eMc_: visp._visp.core.HomogeneousMatrix) -> None
Set the type of tool attached to the robot and the transformation between the end-effector and the tool ( \(^e{\bf M}c\) ).
Note
See init ( vpViper650::vpToolType , vpCameraParameters::vpCameraParametersProjType ), init(vpViper650::vpToolType, const std::string&)
- Parameters:
- tool
Type of tool in use.
- eMc_
Homogeneous matrix representation of the transformation between the end-effector frame and the tool frame.
- parseConfigFile(self, filename: str) None ¶
This function gets the robot constant parameters from a file.
- set_eMc(*args, **kwargs)¶
Overloaded function.
set_eMc(self: visp._visp.robot.Viper, eMc_: visp._visp.core.HomogeneousMatrix) -> None
Set the geometric transformation between the end-effector frame and the tool frame (commonly a camera).
- Parameters:
- eMc_
Transformation between the end-effector frame and the tool frame.
set_eMc(self: visp._visp.robot.Viper, etc_: visp._visp.core.TranslationVector, erc_: visp._visp.core.RxyzVector) -> None
Set the geometric transformation between the end-effector frame and the tool frame (commonly a camera frame).
- Parameters:
- etc_
Translation between the end-effector frame and the tool frame.
- erc_
Rotation between the end-effector frame and the tool frame using the Euler angles in radians with the XYZ convention.