Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guilhem Saurel
pinocchio
Commits
81ce16e0
Commit
81ce16e0
authored
Sep 20, 2016
by
jcarpent
Browse files
[C++] Remove warnings - either cast or not used typedef
parent
65d18bf4
Changes
7
Hide whitespace changes
Inline
Side-by-side
src/algorithm/check.hxx
View file @
81ce16e0
...
...
@@ -108,7 +108,7 @@ namespace se3
for
(
JointIndex
j
=
1
;
int
(
j
)
<
model
.
njoints
;
++
j
)
{
JointIndex
c
=
data
.
lastChild
[
j
];
JointIndex
c
=
(
JointIndex
)
data
.
lastChild
[
j
];
CHECK_DATA
((
int
)
c
<
model
.
njoints
);
int
nv
=
model
.
joints
[
j
].
nv
();
for
(
JointIndex
d
=
j
+
1
;
d
<=
c
;
++
d
)
// explore all descendant
...
...
@@ -122,11 +122,11 @@ namespace se3
CHECK_DATA
(
(
model
.
parents
[
d
]
<
j
)
||
(
model
.
parents
[
d
]
>
c
)
);
int
row
=
model
.
joints
[
j
].
idx_v
();
CHECK_DATA
(
data
.
nvSubtree
[
j
]
==
data
.
nvSubtree_fromRow
[
row
]);
CHECK_DATA
(
data
.
nvSubtree
[
j
]
==
data
.
nvSubtree_fromRow
[
(
size_t
)
row
]);
const
JointModel
&
jparent
=
model
.
joints
[
model
.
parents
[
j
]];
if
(
row
==
0
)
{
CHECK_DATA
(
data
.
parents_fromRow
[
row
]
==-
1
);
}
else
{
CHECK_DATA
(
jparent
.
idx_v
()
+
jparent
.
nv
()
-
1
==
data
.
parents_fromRow
[
row
]);
}
if
(
row
==
0
)
{
CHECK_DATA
(
data
.
parents_fromRow
[
(
size_t
)
row
]
==-
1
);
}
else
{
CHECK_DATA
(
jparent
.
idx_v
()
+
jparent
.
nv
()
-
1
==
data
.
parents_fromRow
[
(
size_t
)
row
]);
}
}
#undef CHECK_DATA
...
...
src/multibody/geometry.hxx
View file @
81ce16e0
...
...
@@ -18,11 +18,7 @@
#ifndef __se3_geometry_hxx__
#define __se3_geometry_hxx__
#include <iostream>
#include <map>
#include <list>
#include <utility>
...
...
@@ -41,7 +37,7 @@ namespace se3
,
collisionRequest
(
1
,
false
,
false
,
1
,
false
,
true
,
fcl
::
GST_INDEP
)
,
collisionResults
(
modelGeom
.
collisionPairs
.
size
())
,
radius
()
,
collisionPairIndex
(
-
1
)
,
collisionPairIndex
(
0
)
,
innerObjects
()
,
outerObjects
()
{
...
...
src/multibody/model.hxx
View file @
81ce16e0
...
...
@@ -63,7 +63,6 @@ namespace se3
const
std
::
string
&
joint_name
)
{
typedef
JointModelDerived
D
;
assert
(
(
njoints
==
(
int
)
joints
.
size
())
&&
(
njoints
==
(
int
)
inertias
.
size
())
&&
(
njoints
==
(
int
)
parents
.
size
())
&&
(
njoints
==
(
int
)
jointPlacements
.
size
())
);
assert
((
joint_model
.
nq
()
>=
0
)
&&
(
joint_model
.
nv
()
>=
0
));
...
...
@@ -110,7 +109,6 @@ namespace se3
const
std
::
string
&
joint_name
)
{
typedef
JointModelDerived
D
;
Eigen
::
VectorXd
max_effort
,
max_velocity
,
min_config
,
max_config
;
max_effort
=
Eigen
::
VectorXd
::
Constant
(
joint_model
.
nv
(),
std
::
numeric_limits
<
double
>::
max
());
...
...
@@ -127,11 +125,11 @@ namespace se3
if
(
fidx
<
0
)
{
// FIXED_JOINT is required because the parent can be the universe and its
// type is FIXED_JOINT
fidx
=
getFrameId
(
names
[
parents
[
jidx
]],
(
FrameType
)(
JOINT
|
FIXED_JOINT
));
fidx
=
(
int
)
getFrameId
(
names
[
parents
[
jidx
]],
(
FrameType
)(
JOINT
|
FIXED_JOINT
));
}
assert
(
fidx
<
frames
.
size
()
&&
"Frame index out of bound"
);
assert
(
(
size_t
)
fidx
<
frames
.
size
()
&&
"Frame index out of bound"
);
// Add a the joint frame attached to itself to the frame vector - redundant information but useful.
return
addFrame
(
Frame
(
names
[
jidx
],
jidx
,
fidx
,
SE3
::
Identity
(),
JOINT
));
return
addFrame
(
Frame
(
names
[
jidx
],
jidx
,
(
FrameIndex
)
fidx
,
SE3
::
Identity
(),
JOINT
));
}
...
...
@@ -152,10 +150,10 @@ namespace se3
if
(
previousFrame
<
0
)
{
// FIXED_JOINT is required because the parent can be the universe and its
// type is FIXED_JOINT
previousFrame
=
getFrameId
(
names
[
parentJoint
],
(
FrameType
)(
JOINT
|
FIXED_JOINT
));
previousFrame
=
(
int
)
getFrameId
(
names
[
parentJoint
],
(
FrameType
)(
JOINT
|
FIXED_JOINT
));
}
assert
(
previousFrame
<
frames
.
size
()
&&
"Frame index out of bound"
);
return
addFrame
(
Frame
(
body_name
,
parentJoint
,
previousFrame
,
body_placement
,
BODY
));
assert
(
(
size_t
)
previousFrame
<
frames
.
size
()
&&
"Frame index out of bound"
);
return
addFrame
(
Frame
(
body_name
,
parentJoint
,
(
FrameIndex
)
previousFrame
,
body_placement
,
BODY
));
}
inline
Model
::
JointIndex
Model
::
getBodyId
(
const
std
::
string
&
name
)
const
...
...
src/parsers/urdf/model.cpp
View file @
81ce16e0
...
...
@@ -124,7 +124,6 @@ namespace se3
const
boost
::
shared_ptr
<
::
urdf
::
Inertial
>
Y
,
const
std
::
string
&
body_name
)
{
Model
::
JointIndex
idx
;
Frame
&
frame
=
model
.
frames
[
parentFrameId
];
int
fid
=
model
.
addFrame
(
...
...
unittest/frames.cpp
View file @
81ce16e0
...
...
@@ -42,7 +42,7 @@ BOOST_AUTO_TEST_CASE ( test_kinematics )
Model
::
Index
parent_idx
=
model
.
existJointName
(
"rarm2_joint"
)
?
model
.
getJointId
(
"rarm2_joint"
)
:
(
Model
::
Index
)(
model
.
njoints
-
1
);
const
std
::
string
&
frame_name
=
std
::
string
(
model
.
names
[
parent_idx
]
+
"_frame"
);
const
SE3
&
framePlacement
=
SE3
::
Random
();
model
.
addFrame
(
Frame
(
frame_name
,
parent_idx
,
-
1
,
framePlacement
,
OP_FRAME
));
model
.
addFrame
(
Frame
(
frame_name
,
parent_idx
,
0
,
framePlacement
,
OP_FRAME
));
se3
::
Data
data
(
model
);
VectorXd
q
=
VectorXd
::
Ones
(
model
.
nq
);
...
...
@@ -64,7 +64,7 @@ BOOST_AUTO_TEST_CASE ( test_jacobian )
Model
::
Index
parent_idx
=
model
.
existJointName
(
"rarm2_joint"
)
?
model
.
getJointId
(
"rarm2_joint"
)
:
(
Model
::
Index
)(
model
.
njoints
-
1
);
const
std
::
string
&
frame_name
=
std
::
string
(
model
.
names
[
parent_idx
]
+
"_frame"
);
const
SE3
&
framePlacement
=
SE3
::
Random
();
model
.
addFrame
(
Frame
(
frame_name
,
parent_idx
,
-
1
,
framePlacement
,
OP_FRAME
));
model
.
addFrame
(
Frame
(
frame_name
,
parent_idx
,
0
,
framePlacement
,
OP_FRAME
));
se3
::
Data
data
(
model
);
VectorXd
q
=
VectorXd
::
Ones
(
model
.
nq
);
...
...
unittest/joint-configurations.cpp
View file @
81ce16e0
...
...
@@ -207,7 +207,6 @@ struct TestDifferentiationJoint
init
(
jmodel
);
typedef
typename
JointModel
::
ConfigVector_t
CV
;
typedef
typename
JointModel
::
TangentVector_t
TV
;
typedef
typename
JointModel
::
Transformation_t
SE3
;
jmodel
.
setIndexes
(
0
,
0
,
0
);
...
...
@@ -272,8 +271,6 @@ struct TestInterpolationJoint
{
init
(
jmodel
);
typedef
typename
JointModel
::
ConfigVector_t
CV
;
typedef
typename
JointModel
::
TangentVector_t
TV
;
typedef
typename
JointModel
::
Transformation_t
SE3
;
jmodel
.
setIndexes
(
0
,
0
,
0
);
...
...
unittest/visitor.cpp
View file @
81ce16e0
...
...
@@ -33,9 +33,9 @@ namespace se3
struct
SimpleVisitor
:
public
se3
::
fusion
::
JointVisitor
<
SimpleVisitor
>
{
typedef
boost
::
fusion
::
vector
<
const
se3
::
Model
&
,
se3
::
Data
&
,
int
>
ArgsType
;
se3
::
Data
&
,
Jo
int
Index
>
ArgsType
;
JOINT_VISITOR_INIT
(
SimpleVisitor
);
...
...
@@ -44,7 +44,7 @@ namespace se3
se3
::
JointDataBase
<
typename
JointModel
::
JointDataDerived
>
&
jdata
,
const
se3
::
Model
&
model
,
se3
::
Data
&
data
,
int
jointId
);
Jo
int
Index
jointId
);
};
template
<
typename
JointModel
>
...
...
@@ -52,7 +52,7 @@ namespace se3
se3
::
JointDataBase
<
typename
JointModel
::
JointDataDerived
>
&
/*jdata*/
,
const
se3
::
Model
&
/*model*/
,
se3
::
Data
&
/*data*/
,
int
/*dummy*/
)
Jo
int
Index
/*dummy*/
)
{
/* --- do nothing --- */
}
template
<
>
...
...
@@ -60,7 +60,7 @@ namespace se3
se3
::
JointDataBase
<
JointDataRevoluteUnaligned
>
&
/*jdata*/
,
const
se3
::
Model
&
/*model*/
,
se3
::
Data
&
/*data*/
,
int
/*dummy*/
)
Jo
int
Index
/*dummy*/
)
{
BOOST_CHECK
(
jmodel
.
shortname
()
==
JointModelRevoluteUnaligned
::
classname
()
);
Eigen
::
Vector3d
axis
=
jmodel
.
derived
().
axis
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment