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
Commits
6e66b3b9
Commit
6e66b3b9
authored
4 years ago
by
Sebastian Ebert
Browse files
Options
Downloads
Patches
Plain Diff
added plan only functionality
parent
f1ac4675
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/grasp_util.h
+2
-2
2 additions, 2 deletions
include/grasp_util.h
src/grasping/grasp_util.cpp
+18
-4
18 additions, 4 deletions
src/grasping/grasp_util.cpp
with
20 additions
and
6 deletions
include/grasp_util.h
+
2
−
2
View file @
6e66b3b9
...
@@ -76,7 +76,7 @@ public:
...
@@ -76,7 +76,7 @@ public:
*/
*/
bool
pickFromAbove
(
moveit
::
planning_interface
::
MoveGroupInterface
&
move_group
,
geometry_msgs
::
Pose
&
pick_pose
,
bool
pickFromAbove
(
moveit
::
planning_interface
::
MoveGroupInterface
&
move_group
,
geometry_msgs
::
Pose
&
pick_pose
,
geometry_msgs
::
Vector3
dimensions
,
double
open_amount
,
std
::
string
supporting_surface_id
,
geometry_msgs
::
Vector3
dimensions
,
double
open_amount
,
std
::
string
supporting_surface_id
,
std
::
string
object_to_pick_id
);
std
::
string
object_to_pick_id
,
bool
plan_only
=
false
);
/**
/**
* Util method to place an object from above.
* Util method to place an object from above.
...
@@ -88,7 +88,7 @@ public:
...
@@ -88,7 +88,7 @@ public:
* @param object_to_place_id ID of the object to place
* @param object_to_place_id ID of the object to place
*/
*/
bool
placeFromAbove
(
moveit
::
planning_interface
::
MoveGroupInterface
&
move_group
,
geometry_msgs
::
Pose
&
place_pose
,
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
);
double
open_amount
,
std
::
string
supporting_surface_id
,
std
::
string
object_to_place_id
,
bool
plan_only
=
false
);
};
};
...
...
This diff is collapsed.
Click to expand it.
src/grasping/grasp_util.cpp
+
18
−
4
View file @
6e66b3b9
...
@@ -75,7 +75,7 @@ GraspUtil::getPickFromAbovePose(geometry_msgs::Pose &object_pose_msg, geometry_m
...
@@ -75,7 +75,7 @@ GraspUtil::getPickFromAbovePose(geometry_msgs::Pose &object_pose_msg, geometry_m
bool
bool
GraspUtil
::
pickFromAbove
(
moveit
::
planning_interface
::
MoveGroupInterface
&
move_group
,
geometry_msgs
::
Pose
&
pick_pose
,
GraspUtil
::
pickFromAbove
(
moveit
::
planning_interface
::
MoveGroupInterface
&
move_group
,
geometry_msgs
::
Pose
&
pick_pose
,
geometry_msgs
::
Vector3
dimensions
,
geometry_msgs
::
Vector3
dimensions
,
double
open_amount
,
std
::
string
supporting_surface_id
,
std
::
string
object_to_pick_id
)
{
double
open_amount
,
std
::
string
supporting_surface_id
,
std
::
string
object_to_pick_id
,
bool
plan_only
)
{
std
::
vector
<
moveit_msgs
::
Grasp
>
grasps
;
std
::
vector
<
moveit_msgs
::
Grasp
>
grasps
;
grasps
.
resize
(
1
);
grasps
.
resize
(
1
);
...
@@ -112,7 +112,14 @@ GraspUtil::pickFromAbove(moveit::planning_interface::MoveGroupInterface &move_gr
...
@@ -112,7 +112,14 @@ GraspUtil::pickFromAbove(moveit::planning_interface::MoveGroupInterface &move_gr
}
}
move_group
.
setSupportSurfaceName
(
supporting_surface_id
);
move_group
.
setSupportSurfaceName
(
supporting_surface_id
);
moveit_msgs
::
MoveItErrorCodes
miec
=
move_group
.
pick
(
object_to_pick_id
,
grasps
);
moveit_msgs
::
MoveItErrorCodes
miec
;
if
(
plan_only
){
miec
=
move_group
.
pick
(
object_to_pick_id
,
grasps
,
true
);
}
else
{
miec
=
move_group
.
pick
(
object_to_pick_id
,
grasps
);
}
if
(
miec
.
val
==
miec
.
SUCCESS
)
{
if
(
miec
.
val
==
miec
.
SUCCESS
)
{
return
true
;
return
true
;
...
@@ -124,7 +131,7 @@ GraspUtil::pickFromAbove(moveit::planning_interface::MoveGroupInterface &move_gr
...
@@ -124,7 +131,7 @@ GraspUtil::pickFromAbove(moveit::planning_interface::MoveGroupInterface &move_gr
bool
bool
GraspUtil
::
placeFromAbove
(
moveit
::
planning_interface
::
MoveGroupInterface
&
move_group
,
geometry_msgs
::
Pose
&
place_pose
,
GraspUtil
::
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
)
{
double
open_amount
,
std
::
string
supporting_surface_id
,
std
::
string
object_to_place_id
,
bool
plan_only
)
{
std
::
vector
<
moveit_msgs
::
PlaceLocation
>
place_location
;
std
::
vector
<
moveit_msgs
::
PlaceLocation
>
place_location
;
place_location
.
resize
(
1
);
place_location
.
resize
(
1
);
...
@@ -147,7 +154,14 @@ GraspUtil::placeFromAbove(moveit::planning_interface::MoveGroupInterface &move_g
...
@@ -147,7 +154,14 @@ GraspUtil::placeFromAbove(moveit::planning_interface::MoveGroupInterface &move_g
setupOpenGripper
(
place_location
[
0
].
post_place_posture
,
open_amount
);
setupOpenGripper
(
place_location
[
0
].
post_place_posture
,
open_amount
);
move_group
.
setSupportSurfaceName
(
supporting_surface_id
);
move_group
.
setSupportSurfaceName
(
supporting_surface_id
);
moveit_msgs
::
MoveItErrorCodes
miec
=
move_group
.
place
(
object_to_place_id
,
place_location
);
moveit_msgs
::
MoveItErrorCodes
miec
;
if
(
plan_only
){
miec
=
move_group
.
place
(
object_to_place_id
,
place_location
,
true
);
}
else
{
miec
=
move_group
.
place
(
object_to_place_id
,
place_location
);
}
if
(
miec
.
val
==
miec
.
SUCCESS
)
{
if
(
miec
.
val
==
miec
.
SUCCESS
)
{
return
true
;
return
true
;
...
...
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