ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
UR uses angle-axis representation for the orientation part of poses.
From the UR script manual, section 1.3 Numbers, Variables and Types:
A pose is given as
p[x,y,z,ax,ay,az]
, wherex
,y
,z
is the position of the TCP, andax
,ay
,az
is the orientation of the TCP, given in axis-angle notation.
That is not directly compatible with quaternions as used in geometry_msgs/Pose. As, as you already noticed, ROS uses metres for distances and radians for orientations (encoded in Quaternions). This is all standardised in REP 103: Standard Units of Measure and Coordinate Conventions.
So you'll have to either convert from axis-angle directly to the quaternion representation, or via Euler RPY as used by tf::Quaternion::setEulerZYX(..)
. At least for the orientation
part.
As for the position
: it would be straightforward to convert from metres to millimeters and back. It's a simple division or multiplication by 1e3
.
What is the proper way to send this pose using the moveit group interface? Thank you.
If you're working "in ROS", then all you should use are metres and radians (converted to Quaternions when working with geometry_msgs/Pose
or similar data structures).
If you're trying to use external data, I would recommend to always convert it to the ROS-standard metres and radians, and then start working with the data. This will make sure that everything is consistent.
2 | No.2 Revision |
UR uses angle-axis representation for the orientation part of poses.
From the UR script manual, manual (version 3.11
, August 26, 2019), section 1.3 Numbers, Variables and Types:
A pose is given as
p[x,y,z,ax,ay,az]
, wherex
,y
,z
is the position of the TCP, andax
,ay
,az
is the orientation of the TCP, given in axis-angle notation.
That is not directly compatible with quaternions as used in geometry_msgs/Pose. As, as you already noticed, ROS uses metres for distances and radians for orientations (encoded in Quaternions). This is all standardised in REP 103: Standard Units of Measure and Coordinate Conventions.
So you'll have to either convert from axis-angle directly to the quaternion representation, or via Euler RPY as used by tf::Quaternion::setEulerZYX(..)
. At least for the orientation
part.
As for the position
: it would be straightforward to convert from metres to millimeters and back. It's a simple division or multiplication by 1e3
.
What is the proper way to send this pose using the moveit group interface? Thank you.
If you're working "in ROS", then all you should use are metres and radians (converted to Quaternions when working with geometry_msgs/Pose
or similar data structures).
If you're trying to use external data, I would recommend to always convert it to the ROS-standard metres and radians, and then start working with the data. This will make sure that everything is consistent.
3 | No.3 Revision |
UR uses angle-axis representation for the orientation part of poses.
From the UR script manual (version 3.11
, August 26, 2019), section 1.3 Numbers, Variables and Types:
A pose is given as
p[x,y,z,ax,ay,az]
, wherex
,y
,z
is the position of the TCP, andax
,ay
,az
is the orientation of the TCP, given in axis-angle notation.
That is not directly compatible with quaternions as used in geometry_msgs/Pose. As, as you already noticed, ROS uses metres for distances and radians for orientations (encoded in Quaternions). This is all standardised in REP 103: Standard Units of Measure and Coordinate Conventions.
So you'll have to either convert from axis-angle directly to the quaternion representation, or via Euler RPY as used by tf::Quaternion::setEulerZYX(..)
. At least for the orientation
part.
As for the position
: it would be straightforward to convert from metres to millimeters and back. It's a simple division or multiplication by 1e3
.
What is the proper way to send this pose using the moveit group interface? Thank you.
If you're working "in ROS", then all you should use are metres and radians (converted to Quaternions when working with geometry_msgs/Pose
or similar data structures).
If you're trying to use external data, I would recommend to always convert it to the ROS-standard metres and radians, and then start working with the data. This will make sure that everything is consistent.
And finally:
Send pose to Universal Robots in MoveIt
If/when you're using ROS + MoveIt, it would seem important to realise you're not actually sending anything "to Universal Robots". The whole of ROS is standardised on certain representations for poses and other geometric concepts.
Those get translated by drivers and other nodes which interface with the actual hardware (or other pieces of software). MoveIt does not know anything about Universal Robots, the fact that UR uses axis-angle and mms for positions. It doesn't have to.
So you're question ultimately would be answered by: you don't, as it's impossible. You can only specify poses in the representation used everywhere in ROS, then have MoveIt process that and finally tranform that representation into one that a UR controller can work with -- which is done by the driver node that you use.
4 | No.4 Revision |
UR uses angle-axis representation for the orientation part of poses.
From the UR script manual (version 3.11
, August 26, 2019), section 1.3 Numbers, Variables and Types:
A pose is given as
p[x,y,z,ax,ay,az]
, wherex
,y
,z
is the position of the TCP, andax
,ay
,az
is the orientation of the TCP, given in axis-angle notation.
That is not directly compatible with quaternions as used in geometry_msgs/Pose. As, as you already noticed, ROS uses metres for distances and radians for orientations (encoded (but those typically get encoded in Quaternions). , for which the individual elements don't use radians). This is all standardised in REP 103: Standard Units of Measure and Coordinate Conventions.
So you'll have to either convert from axis-angle directly to the quaternion representation, or via Euler RPY as used by tf::Quaternion::setEulerZYX(..)
. At least for the orientation
part.
As for the position
: it would be straightforward to convert from metres to millimeters and back. It's a simple division or multiplication by 1e3
.
What is the proper way to send this pose using the moveit group interface? Thank you.
If you're working "in ROS", then all you should use are metres and radians (converted to Quaternions when working with geometry_msgs/Pose
or similar data structures).
If you're trying to use external data, I would recommend to always convert it to the ROS-standard metres and radians, and then start working with the data. This will make sure that everything is consistent.
And finally:
Send pose to Universal Robots in MoveIt
If/when you're using ROS + MoveIt, it would seem important to realise you're not actually sending anything "to Universal Robots". The whole of ROS is standardised on certain representations for poses and other geometric concepts.
Those get translated by drivers and other nodes which interface with the actual hardware (or other pieces of software). MoveIt does not know anything about Universal Robots, the fact that UR uses axis-angle and mms for positions. It doesn't have to.
So you're question ultimately would be answered by: you don't, as it's impossible. You can only specify poses in the representation used everywhere in ROS, then have MoveIt process that and finally tranform that representation into one that a UR controller can work with -- which is done by the driver node that you use.