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
0cad757e
Commit
0cad757e
authored
3 years ago
by
David Tiede
Browse files
Options
Downloads
Patches
Plain Diff
Change log level
parent
6eebb19a
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
+6
-4
6 additions, 4 deletions
safety_planning_request_adapters/src/add_safety.cpp
with
6 additions
and
4 deletions
safety_planning_request_adapters/src/add_safety.cpp
+
6
−
4
View file @
0cad757e
...
...
@@ -19,12 +19,12 @@ namespace safety_planning_request_adapters
const
planning_interface
::
MotionPlanRequest
&
req
,
planning_interface
::
MotionPlanResponse
&
res
,
std
::
vector
<
std
::
size_t
>&
added_path_index
)
const
override
{
ROS_
ERROR
(
"ADAPTER PACKAGE: Adapter loaded"
);
ROS_
INFO
(
"ADAPTER PACKAGE: Adapter loaded"
);
bool
result
=
planner
(
planning_scene
,
req
,
res
);
if
(
result
&&
res
.
trajectory_
)
// Only run after planning
{
ROS_
ERROR
(
"ADAPTER PACKAGE: Start plugin"
);
ROS_
INFO
(
"ADAPTER PACKAGE: Start plugin"
);
robot_trajectory
::
RobotTrajectory
&
trajectory
=
*
res
.
trajectory_
;
const
robot_model
::
JointModelGroup
*
group
=
trajectory
.
getGroup
();
...
...
@@ -42,7 +42,9 @@ namespace safety_planning_request_adapters
robot_state
::
RobotStatePtr
waypoint
=
trajectory
.
getWayPointPtr
(
p
);
trajectory
.
setWayPointDurationFromPrevious
(
p
,
trajectory
.
getWayPointDurationFromPrevious
(
p
)
/
VELOCITY_LIMIT
);
//ROS_WARN("ADAPTER PACKAGE: vel1: %f", waypoint->getVariableVelocity(idx[0]));
// ROS_INFO("ADAPTER PACKAGE: vel1: (%f,%f)",
// trajectory.getWayPointDurationFromStart(p),
// waypoint->getVariableVelocity(idx[num_joints-1]) * VELOCITY_LIMIT);
for
(
size_t
j
=
0
;
j
<
num_joints
;
++
j
)
{
waypoint
->
setVariableVelocity
(
idx
[
j
],
waypoint
->
getVariableVelocity
(
idx
[
j
])
*
VELOCITY_LIMIT
);
...
...
@@ -50,7 +52,7 @@ namespace safety_planning_request_adapters
}
}
}
ROS_
ERROR
(
"ADAPTER PACKAGE: End plugin"
);
ROS_
INFO
(
"ADAPTER PACKAGE: End plugin"
);
return
result
;
};
};
...
...
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