Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
panda_grasping
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
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
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
CeTI
ROS
ROS Packages
panda_grasping
Compare revisions
c47afd31ba85f303f4e624f482e3dcd51177b839 to d7c146564f57f4013ffba17db5c07dfba9c9dc6d
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
ceti/ros/packages/panda_grasping
Select target project
No results found
d7c146564f57f4013ffba17db5c07dfba9c9dc6d
Select Git revision
Swap
Target
ceti/ros/packages/panda_grasping
Select target project
ceti/ros/packages/panda_grasping
1 result
c47afd31ba85f303f4e624f482e3dcd51177b839
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (2)
add homeing method
· 27c92ac6
Johannes Mey
authored
3 years ago
27c92ac6
Merge branch 'noetic/feature/homing' into 'master'
· d7c14656
Johannes Mey
authored
3 years ago
add homeing method See merge request
!1
d7c14656
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/grasp_util.h
+7
-0
7 additions, 0 deletions
include/grasp_util.h
src/grasping/grasp_util.cpp
+20
-0
20 additions, 0 deletions
src/grasping/grasp_util.cpp
with
27 additions
and
0 deletions
include/grasp_util.h
View file @
d7c14656
...
...
@@ -90,6 +90,13 @@ public:
bool
placeFromAbove
(
moveit
::
planning_interface
::
MoveGroupInterface
&
move_group
,
geometry_msgs
::
Pose
&
place_pose
,
double
open_amount
,
std
::
string
supporting_surface_id
,
std
::
string
object_to_place_id
,
bool
plan_only
=
false
);
/**
* Homes the gripper (in case it was abused before and is in an inconsistent state)
* This method is blocking with a maximum runtime of ~30s
* @return true if homing succeeded, false otherwise
*/
static
bool
homeGripper
();
};
#endif //PANDA_GRASPING_GRASP_UTIL_H
This diff is collapsed.
Click to expand it.
src/grasping/grasp_util.cpp
View file @
d7c14656
...
...
@@ -3,6 +3,8 @@
//
#include
"grasp_util.h"
#include
<tf2/transform_datatypes.h>
#include
<franka_gripper/HomingAction.h>
#include
<franka_gripper/HomingGoal.h>
void
GraspUtil
::
setupOpenGripper
(
trajectory_msgs
::
JointTrajectory
&
posture
,
double
amount
)
{
posture
.
joint_names
.
resize
(
2
);
...
...
@@ -158,3 +160,21 @@ GraspUtil::placeFromAbove(moveit::planning_interface::MoveGroupInterface &move_g
ROS_ERROR_STREAM
(
"Error while executing place task. MoveItErrorCode: "
<<
miec
.
val
);
return
false
;
}
bool
GraspUtil
::
homeGripper
()
{
actionlib
::
SimpleActionClient
<
franka_gripper
::
HomingAction
>
ac
(
"/franka_gripper/homing"
,
true
);
if
(
!
ac
.
waitForServer
(
ros
::
Duration
(
10.0
)))
{
ROS_ERROR
(
"Gripper homing failed (action server not available)."
);
return
false
;
}
franka_gripper
::
HomingGoal
goal
;
ac
.
sendGoal
(
goal
);
if
(
ac
.
waitForResult
(
ros
::
Duration
(
20.0
)))
{
actionlib
::
SimpleClientGoalState
state
=
ac
.
getState
();
ROS_INFO_STREAM
(
"Homing finished: "
<<
state
.
toString
());
return
state
==
actionlib
::
SimpleClientGoalState
::
SUCCEEDED
;
}
else
{
ROS_ERROR
(
"Gripper homing failed (with timeout)."
);
return
false
;
}
}
This diff is collapsed.
Click to expand it.