Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
franka_description
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
CeTI
ROS
ROS Packages
franka_description
Commits
221c2196
Commit
221c2196
authored
7 years ago
by
Jose Medina
Committed by
Florian Walch
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Remove unused gravity variable and add orientation check
parent
df2b8dff
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
franka_example_controllers/src/cartesian_impedance_example_controller.cpp
+3
-3
3 additions, 3 deletions
...ontrollers/src/cartesian_impedance_example_controller.cpp
with
3 additions
and
3 deletions
franka_example_controllers/src/cartesian_impedance_example_controller.cpp
+
3
−
3
View file @
221c2196
...
@@ -134,8 +134,6 @@ void CartesianImpedanceExampleController::update(const ros::Time& /*time*/,
...
@@ -134,8 +134,6 @@ void CartesianImpedanceExampleController::update(const ros::Time& /*time*/,
const
ros
::
Duration
&
/*period*/
)
{
const
ros
::
Duration
&
/*period*/
)
{
// get state variables
// get state variables
franka
::
RobotState
robot_state
=
state_handle_
->
getRobotState
();
franka
::
RobotState
robot_state
=
state_handle_
->
getRobotState
();
std
::
array
<
double
,
7
>
gravity_array
=
model_handle_
->
getGravity
(
robot_state
.
m_total
,
robot_state
.
F_x_Ctotal
);
std
::
array
<
double
,
7
>
coriolis_array
=
std
::
array
<
double
,
7
>
coriolis_array
=
model_handle_
->
getCoriolis
(
robot_state
.
I_total
,
robot_state
.
m_total
,
robot_state
.
F_x_Ctotal
);
model_handle_
->
getCoriolis
(
robot_state
.
I_total
,
robot_state
.
m_total
,
robot_state
.
F_x_Ctotal
);
std
::
array
<
double
,
42
>
jacobian_array
=
std
::
array
<
double
,
42
>
jacobian_array
=
...
@@ -143,7 +141,6 @@ void CartesianImpedanceExampleController::update(const ros::Time& /*time*/,
...
@@ -143,7 +141,6 @@ void CartesianImpedanceExampleController::update(const ros::Time& /*time*/,
// convert to Eigen
// convert to Eigen
Eigen
::
Map
<
Eigen
::
Matrix
<
double
,
7
,
1
>
>
coriolis
(
coriolis_array
.
data
());
Eigen
::
Map
<
Eigen
::
Matrix
<
double
,
7
,
1
>
>
coriolis
(
coriolis_array
.
data
());
Eigen
::
Map
<
Eigen
::
Matrix
<
double
,
7
,
1
>
>
gravity
(
gravity_array
.
data
());
Eigen
::
Map
<
Eigen
::
Matrix
<
double
,
6
,
7
>
>
jacobian
(
jacobian_array
.
data
());
Eigen
::
Map
<
Eigen
::
Matrix
<
double
,
6
,
7
>
>
jacobian
(
jacobian_array
.
data
());
Eigen
::
Map
<
Eigen
::
Matrix
<
double
,
7
,
1
>
>
q
(
robot_state
.
q
.
data
());
Eigen
::
Map
<
Eigen
::
Matrix
<
double
,
7
,
1
>
>
q
(
robot_state
.
q
.
data
());
Eigen
::
Map
<
Eigen
::
Matrix
<
double
,
7
,
1
>
>
dq
(
robot_state
.
dq
.
data
());
Eigen
::
Map
<
Eigen
::
Matrix
<
double
,
7
,
1
>
>
dq
(
robot_state
.
dq
.
data
());
...
@@ -159,6 +156,9 @@ void CartesianImpedanceExampleController::update(const ros::Time& /*time*/,
...
@@ -159,6 +156,9 @@ void CartesianImpedanceExampleController::update(const ros::Time& /*time*/,
error
.
head
(
3
)
<<
position
-
position_d_
;
error
.
head
(
3
)
<<
position
-
position_d_
;
// orientation error
// orientation error
if
(
orientation_d_
.
coeffs
().
dot
(
orientation
.
coeffs
())
<
0.0
)
{
orientation
.
coeffs
()
<<
-
orientation
.
coeffs
();
}
// "difference" quaternion
// "difference" quaternion
Eigen
::
Quaterniond
error_quaternion
(
orientation
*
orientation_d_
.
inverse
());
Eigen
::
Quaterniond
error_quaternion
(
orientation
*
orientation_d_
.
inverse
());
// convert to axis angle
// convert to axis angle
...
...
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