Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
adapter_pkgs
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
David Tiede
adapter_pkgs
Commits
ee7db8db
Commit
ee7db8db
authored
4 years ago
by
David Tiede
Browse files
Options
Downloads
Patches
Plain Diff
Reformat
parent
a9fd2668
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
safety_planning_request_adapters/src/add_safety.cpp
+22
-21
22 additions, 21 deletions
safety_planning_request_adapters/src/add_safety.cpp
with
22 additions
and
21 deletions
safety_planning_request_adapters/src/add_safety.cpp
+
22
−
21
View file @
ee7db8db
#include
<moveit/planning_request_adapter/planning_request_adapter.h>
#include
<class_loader/class_loader.hpp>
#include
<moveit/planning_request_adapter/planning_request_adapter.h>
#include
<ros/console.h>
namespace
safety_planning_request_adapters
{
class
AddSafety
:
public
planning_request_adapter
::
PlanningRequestAdapter
{
int
VELOCITY_LIMIT
=
3
;
class
AddSafety
:
public
planning_request_adapter
::
PlanningRequestAdapter
{
int
VELOCITY_LIMIT
=
3
;
public:
public:
std
::
string
getDescription
()
const
override
{
return
"Add Safety"
;
}
std
::
string
getDescription
()
const
override
{
return
"Add Safety"
;
}
bool
adaptAndPlan
(
const
PlannerFn
&
planner
,
const
planning_scene
::
PlanningSceneConstPtr
&
planning_scene
,
const
planning_interface
::
MotionPlanRequest
&
req
,
planning_interface
::
MotionPlanResponse
&
res
,
std
::
vector
<
std
::
size_t
>&
added_path_index
)
const
override
{
ROS_ERROR
(
"ADAPTER PACKAGE: A
DAPTER LOADED
"
);
bool
adaptAndPlan
(
const
PlannerFn
&
planner
,
const
planning_scene
::
PlanningSceneConstPtr
&
planning_scene
,
const
planning_interface
::
MotionPlanRequest
&
req
,
planning_interface
::
MotionPlanResponse
&
res
,
std
::
vector
<
std
::
size_t
>&
added_path_index
)
const
override
{
ROS_ERROR
(
"ADAPTER PACKAGE: A
dapter loaded
"
);
bool
result
=
planner
(
planning_scene
,
req
,
res
);
if
(
result
&&
res
.
trajectory_
)
// Only run after planning
{
bool
result
=
planner
(
planning_scene
,
req
,
res
);
if
(
result
&&
res
.
trajectory_
)
// Only run after planning
{
ROS_ERROR
(
"ADAPTER PACKAGE: After planning"
);
// ROS_DEBUG("Running '%s'", getDescription().c_str());
// if (!time_param_.computeTimeStamps(*res.trajectory_, req.max_velocity_scaling_factor,
// req.max_acceleration_scaling_factor))
...
...
@@ -31,11 +32,11 @@ public:
// ROS_ERROR("Time parametrization for the solution path failed.");
// result = false;
// }
}
}
return
result
;
}
};
return
result
;
}
};
}
// namespace safety_planning_request_adapters
CLASS_LOADER_REGISTER_CLASS
(
safety_planning_request_adapters
::
AddSafety
,
planning_request_adapter
::
PlanningRequestAdapter
);
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