Permalink
Browse files

Add HumanoidDynamicRobot copy constructor.

  • Loading branch information...
1 parent 4564809 commit 3c72990285d0f0c54d19e9ac92ce9eac9b965a1b Antonio El Khoury committed Oct 12, 2012
Showing with 26 additions and 0 deletions.
  1. +3 −0 include/ard/rbdl/model/humanoid-dynamic-robot.hh
  2. +23 −0 src/humanoid-dynamic-robot.cc
@@ -46,6 +46,9 @@ namespace ard
/// \brief Default construcor.
explicit HumanoidDynamicRobot ();
+ /// \brief Copy constructor.
+ HumanoidDynamicRobot (const HumanoidDynamicRobot& robot);
+
/// \brief Destructor.
virtual ~HumanoidDynamicRobot();
@@ -53,6 +53,29 @@ namespace ard
{
}
+ HumanoidDynamicRobot::HumanoidDynamicRobot
+ (const HumanoidDynamicRobot& robot) :
+ boost::enable_shared_from_this<HumanoidDynamicRobot> ()
+ {
+ dynamicRobot_ = robot.dynamicRobot ();
+ robot.waist (waist_);
+ robot.chest (chest_);
+ robot.leftWrist (leftWrist_);
+ robot.rightWrist (rightWrist_);
+ robot.leftHand (leftHand_);
+ robot.rightHand (rightHand_);
+ leftHandClench_ = robot.getHandClench (robot.leftHand ());
+ rightHandClench_ = robot.getHandClench (robot.rightHand ());
+ robot.leftAnkle (leftAnkle_);
+ robot.rightAnkle (rightAnkle_);
+ robot.leftFoot (leftFoot_);
+ robot.rightFoot (rightFoot_);
+ robot.gazeJoint (gazeJoint_);
+ gazeOrigin_ = robot.gazeOrigin ();
+ gazeDirection_ = robot.gazeDirection ();
+ zeroMomentPoint_ = robot.zeroMomentumPoint ();
+ }
+
HumanoidDynamicRobot::~HumanoidDynamicRobot ()
{
}

0 comments on commit 3c72990

Please sign in to comment.