Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
recovery_behaviors
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
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
labrobotica
ros
navigation
3d_navigation
recovery_behaviors
Commits
09192fa9
Commit
09192fa9
authored
5 years ago
by
José Enrique Domínguez Vidal
Browse files
Options
Downloads
Patches
Plain Diff
Code cleaning
parent
e978ee0e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
rotational_recovery/src/rotational_recovery.cpp
+1
-1
1 addition, 1 deletion
rotational_recovery/src/rotational_recovery.cpp
twist_recovery/src/twist_recovery.cpp
+8
-0
8 additions, 0 deletions
twist_recovery/src/twist_recovery.cpp
with
9 additions
and
1 deletion
rotational_recovery/src/rotational_recovery.cpp
+
1
−
1
View file @
09192fa9
...
@@ -149,7 +149,7 @@ namespace rotational_recovery
...
@@ -149,7 +149,7 @@ namespace rotational_recovery
cost
=
normalizedPoseCost
(
current
);
cost
=
normalizedPoseCost
(
current
);
double
t
;
// Will hold the first time that is invalid
double
t
;
// Will hold the first time that is invalid
geometry_msgs
::
Pose2D
current_tmp
=
current
;
geometry_msgs
::
Pose2D
current_tmp
=
current
;
ROS_
INFO
_NAMED
(
"top"
,
"init = (%.2f, %.2f, %.2f), current = (%.2f, %.2f, %.2f)"
,
ROS_
DEBUG
_NAMED
(
"top"
,
"init = (%.2f, %.2f, %.2f), current = (%.2f, %.2f, %.2f)"
,
current
.
x
,
current
.
y
,
current
.
theta
,
current_tmp
.
x
,
current_tmp
.
y
,
current_tmp
.
theta
);
current
.
x
,
current
.
y
,
current
.
theta
,
current_tmp
.
x
,
current_tmp
.
y
,
current_tmp
.
theta
);
double
next_cost
;
double
next_cost
;
...
...
This diff is collapsed.
Click to expand it.
twist_recovery/src/twist_recovery.cpp
+
8
−
0
View file @
09192fa9
...
@@ -194,6 +194,7 @@ namespace twist_recovery
...
@@ -194,6 +194,7 @@ namespace twist_recovery
void
TwistRecovery
::
runBehavior
()
void
TwistRecovery
::
runBehavior
()
{
{
ROS_ASSERT
(
initialized_
);
ROS_ASSERT
(
initialized_
);
double
stop_time
=
0.5
;
// Threre is a maximum duration this recovery can run defined in duration_.
// Threre is a maximum duration this recovery can run defined in duration_.
// However, there may be an obstacle so it is necessary to figure out how
// However, there may be an obstacle so it is necessary to figure out how
...
@@ -210,6 +211,13 @@ namespace twist_recovery
...
@@ -210,6 +211,13 @@ namespace twist_recovery
pub_
.
publish
(
scaleGivenAccelerationLimits
(
base_frame_twist_
,
max_duration
-
t
));
pub_
.
publish
(
scaleGivenAccelerationLimits
(
base_frame_twist_
,
max_duration
-
t
));
r
.
sleep
();
r
.
sleep
();
}
}
base_frame_twist_
.
linear
.
x
=
0.0
;
ROS_INFO_NAMED
(
"top"
,
"Applying STOP for %.2f s"
,
stop_time
);
for
(
double
t
=
0
;
t
<
stop_time
;
t
+=
1
/
controller_frequency_
)
{
pub_
.
publish
(
scaleGivenAccelerationLimits
(
base_frame_twist_
,
stop_time
-
t
));
r
.
sleep
();
}
}
}
}
// namespace twist_recovery
}
// namespace twist_recovery
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