forked from orocos/orocos_kinematics_dynamics
-
Notifications
You must be signed in to change notification settings - Fork 0
/
meka-patch.patch
37 lines (36 loc) · 1.43 KB
/
meka-patch.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
diff --git a/orocos_kdl/src/chain.hpp b/orocos_kdl/src/chain.hpp
index 7758c79..fcd0739 100644
--- a/orocos_kdl/src/chain.hpp
+++ b/orocos_kdl/src/chain.hpp
@@ -84,6 +84,16 @@ namespace KDL {
* @return a constant reference to the nr'd segment
*/
const Segment& getSegment(unsigned int nr)const;
+ /**
+ * Meka Patch :
+ * Request the nr'd segment of the chain. There is no boundary
+ * checking.
+ *
+ * @param nr the nr of the segment starting from 0
+ *
+ * @return a reference to the nr'd segment
+ */
+ Segment* getMutableSegment(unsigned int nr){ return &segments[nr]; };
virtual ~Chain();
};
diff --git a/orocos_kdl/src/chainidsolver_recursive_newton_euler.hpp b/orocos_kdl/src/chainidsolver_recursive_newton_euler.hpp
index 3140cd2..c8789a1 100644
--- a/orocos_kdl/src/chainidsolver_recursive_newton_euler.hpp
+++ b/orocos_kdl/src/chainidsolver_recursive_newton_euler.hpp
@@ -58,9 +58,9 @@ namespace KDL{
* \param torques the resulting torques for the joints
*/
int CartToJnt(const JntArray &q, const JntArray &q_dot, const JntArray &q_dotdot, const Wrenches& f_ext,JntArray &torques);
-
+ Chain chain; // Meka Patch : allow to be modified online (SetPayload in Dynamatics)
private:
- Chain chain;
+ //Chain chain;
unsigned int nj;
unsigned int ns;
std::vector<Frame> X;