Skip to content
Snippets Groups Projects
Commit e3eea62c authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

Transform3f -> Transform3s

parent 667159be
No related branches found
No related tags found
No related merge requests found
......@@ -64,7 +64,7 @@ class HPP_MANIPULATION_DLLAPI Device : public pinocchio::HumanoidRobot {
virtual std::ostream& print(std::ostream& os) const;
void setRobotRootPosition(const std::string& robotName,
const Transform3f& positionWRTParentJoint);
const Transform3s& positionWRTParentJoint);
virtual pinocchio::DevicePtr_t clone() const;
......
......@@ -88,7 +88,7 @@ typedef constraints::RelativeTransformationR3xSO3 RelativeTransformationR3xSO3;
typedef constraints::RelativeTransformationPtr_t RelativeTransformationPtr_t;
typedef core::value_type value_type;
typedef core::size_type size_type;
typedef core::Transform3f Transform3f;
typedef core::Transform3s Transform3s;
typedef core::vector_t vector_t;
typedef core::vectorIn_t vectorIn_t;
typedef core::vectorOut_t vectorOut_t;
......
......@@ -66,7 +66,7 @@ class HPP_MANIPULATION_DLLAPI Handle {
/// \return the constraint of relative position between the handle and
/// the gripper.
static HandlePtr_t create(const std::string& name,
const Transform3f& localPosition,
const Transform3s& localPosition,
const DeviceWkPtr_t& robot,
const JointPtr_t& joint) {
Handle* ptr = new Handle(name, localPosition, robot, joint);
......@@ -98,10 +98,10 @@ class HPP_MANIPULATION_DLLAPI Handle {
/// \}
/// Get local position in joint frame
const Transform3f& localPosition() const { return localPosition_; }
const Transform3s& localPosition() const { return localPosition_; }
/// Set local position in joint frame
void localPosition(const Transform3f& localPosition) {
void localPosition(const Transform3s& localPosition) {
localPosition_ = localPosition;
}
......@@ -175,7 +175,7 @@ class HPP_MANIPULATION_DLLAPI Handle {
/// \param grasp object containing the grasp information
/// \return the constraint of relative position between the handle and
/// the gripper.
Handle(const std::string& name, const Transform3f& localPosition,
Handle(const std::string& name, const Transform3s& localPosition,
const DeviceWkPtr_t& robot, const JointPtr_t& joint)
: name_(name),
localPosition_(localPosition),
......@@ -192,7 +192,7 @@ class HPP_MANIPULATION_DLLAPI Handle {
private:
std::string name_;
/// Position of the handle in the joint frame.
Transform3f localPosition_;
Transform3s localPosition_;
/// Joint to which the handle is linked.
JointPtr_t joint_;
/// Pointer to the robot
......
......@@ -50,7 +50,7 @@ pinocchio::DevicePtr_t Device::clone() const {
return shPtr;
}
void Device::setRobotRootPosition(const std::string& rn, const Transform3f& t) {
void Device::setRobotRootPosition(const std::string& rn, const Transform3s& t) {
FrameIndices_t idxs = robotFrames(rn);
if (idxs.size() == 0)
throw std::invalid_argument("No frame for robot name " + rn);
......@@ -65,7 +65,7 @@ void Device::setRobotRootPosition(const std::string& rn, const Transform3f& t) {
return;
}
Transform3f shift(t * rootFrame.placement.inverse());
Transform3s shift(t * rootFrame.placement.inverse());
// Find all the frames that have the same parent joint.
for (std::size_t i = 1; i < idxs.size(); ++i) {
Frame& frame = m.frames[idxs[i]];
......
......@@ -204,8 +204,8 @@ ImplicitPtr_t Handle::createGraspAndComplement(const GripperPtr_t& gripper,
ImplicitPtr_t Handle::createPreGrasp(const GripperPtr_t& gripper,
const value_type& shift,
std::string n) const {
Transform3f M = gripper->objectPositionInJoint() *
Transform3f(I3, vector3_t(shift, 0, 0));
Transform3s M = gripper->objectPositionInJoint() *
Transform3s(I3, vector3_t(shift, 0, 0));
if (n.empty())
n = "Pregrasp_ " + maskToStr(mask_) + "_" + name() + "_" + gripper->name();
ImplicitPtr_t result(Implicit::create(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment