Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
pinocchio
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Stack Of Tasks
pinocchio
Commits
0c3e0a5f
Commit
0c3e0a5f
authored
9 years ago
by
jcarpent
Browse files
Options
Downloads
Patches
Plain Diff
[C++][Bug fix] Properly expose com, vcom and acom vectors
parent
5f02c438
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/python/data.hpp
+14
-4
14 additions, 4 deletions
src/python/data.hpp
with
14 additions
and
4 deletions
src/python/data.hpp
+
14
−
4
View file @
0c3e0a5f
...
...
@@ -37,6 +37,8 @@ namespace se3
{
typedef
Data
::
Matrix6x
Matrix6x
;
typedef
Data
::
Matrix3x
Matrix3x
;
typedef
eigenpy
::
UnalignedEquivalent
<
Eigen
::
Vector3d
>::
type
Vector3d_fx
;
public:
...
...
@@ -67,6 +69,7 @@ namespace se3
void
visit
(
PyClass
&
cl
)
const
{
cl
.
ADD_DATA_PROPERTY
(
std
::
vector
<
Motion
>
,
a
,
"Body acceleration"
)
.
ADD_DATA_PROPERTY
(
std
::
vector
<
Motion
>
,
v
,
"Body velocity"
)
.
ADD_DATA_PROPERTY
(
std
::
vector
<
Force
>
,
f
,
"Body force"
)
...
...
@@ -85,15 +88,18 @@ namespace se3
.
ADD_DATA_PROPERTY
(
std
::
vector
<
int
>
,
nvSubtree_fromRow
,
""
)
.
ADD_DATA_PROPERTY_CONST
(
Eigen
::
MatrixXd
,
J
,
"Jacobian of joint placement"
)
.
ADD_DATA_PROPERTY
(
std
::
vector
<
SE3
>
,
iMf
,
"Body placement wrt to algorithm end effector."
)
.
ADD_DATA_PROPERTY_CONST
(
std
::
vector
<
Eigen
::
Vector3d
>
,
com
,
"Subtree com position."
)
.
ADD_DATA_PROPERTY_CONST
(
std
::
vector
<
Eigen
::
Vector3d
>
,
vcom
,
"Subtree com velocity."
)
.
ADD_DATA_PROPERTY_CONST
(
std
::
vector
<
Eigen
::
Vector3d
>
,
acom
,
"Subtree com acceleration."
)
// .ADD_DATA_PROPERTY_CONST(std::vector<Eigen::Vector3d>,com,"Subtree com position.")
// .ADD_DATA_PROPERTY_CONST(std::vector<Eigen::Vector3d>,vcom,"Subtree com velocity.")
// .ADD_DATA_PROPERTY_CONST(std::vector<Eigen::Vector3d>,acom,"Subtree com acceleration.")
.
def
(
"com_pos"
,
&
DataPythonVisitor
::
com_pos
,
"Subtree com position."
)
.
def
(
"com_vel"
,
&
DataPythonVisitor
::
com_vel
,
"Subtree com velocity."
)
.
def
(
"com_acc"
,
&
DataPythonVisitor
::
com_acc
,
"Subtree com acceleration."
)
.
ADD_DATA_PROPERTY
(
std
::
vector
<
double
>
,
mass
,
"Subtree total mass."
)
.
ADD_DATA_PROPERTY_CONST
(
Matrix3x
,
Jcom
,
"Jacobian of center of mass."
)
.
ADD_DATA_PROPERTY_CONST
(
Eigen
::
VectorXd
,
effortLimit
,
"Joint max effort"
)
.
ADD_DATA_PROPERTY_CONST
(
Eigen
::
VectorXd
,
velocityLimit
,
"Joint max velocity"
)
.
ADD_DATA_PROPERTY_CONST
(
Eigen
::
VectorXd
,
lowerPositionLimit
,
"Limit for joint lower position"
)
.
ADD_DATA_PROPERTY_CONST
(
Eigen
::
VectorXd
,
upperPositionLimit
,
"Limit for joint upper position"
)
;
...
...
@@ -128,6 +134,10 @@ namespace se3
IMPL_DATA_PROPERTY_CONST
(
Eigen
::
VectorXd
,
lowerPositionLimit
,
"Limit for joint lower position"
)
IMPL_DATA_PROPERTY_CONST
(
Eigen
::
VectorXd
,
upperPositionLimit
,
"Limit for joint upper position"
)
static
Vector3d_fx
com_pos
(
DataHandler
&
d
,
int
i
)
{
return
d
->
com
[(
size_t
)
i
];
}
static
Vector3d_fx
com_vel
(
DataHandler
&
d
,
int
i
)
{
return
d
->
vcom
[(
size_t
)
i
];
}
static
Vector3d_fx
com_acc
(
DataHandler
&
d
,
int
i
)
{
return
d
->
acom
[(
size_t
)
i
];
}
/* --- Expose --------------------------------------------------------- */
static
void
expose
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment