Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iri_safe_cmd
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
iri_safe_cmd
Commits
92fc2b94
Commit
92fc2b94
authored
11 years ago
by
Martí Morta Garriga
Browse files
Options
Downloads
Patches
Plain Diff
using velocity to define the safe area
parent
d34fa6fd
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
include/safe_cmd_alg_node.h
+1
-1
1 addition, 1 deletion
include/safe_cmd_alg_node.h
src/safe_cmd_alg_node.cpp
+2
-2
2 additions, 2 deletions
src/safe_cmd_alg_node.cpp
with
3 additions
and
3 deletions
include/safe_cmd_alg_node.h
+
1
−
1
View file @
92fc2b94
...
@@ -68,7 +68,7 @@ class SafeCmdAlgNode : public algorithm_base::IriBaseAlgorithm<SafeCmdAlgorithm>
...
@@ -68,7 +68,7 @@ class SafeCmdAlgNode : public algorithm_base::IriBaseAlgorithm<SafeCmdAlgorithm>
// [action client attributes]
// [action client attributes]
bool
front_obstacle_
;
bool
front_obstacle_
;
bool
rear_obstacle_
;
bool
rear_obstacle_
;
float
radius
_
;
float
scale
_
;
bool
is_point_in_safe_area_
(
const
sensor_msgs
::
LaserScan
::
ConstPtr
&
scan
);
bool
is_point_in_safe_area_
(
const
sensor_msgs
::
LaserScan
::
ConstPtr
&
scan
);
public:
public:
...
...
This diff is collapsed.
Click to expand it.
src/safe_cmd_alg_node.cpp
+
2
−
2
View file @
92fc2b94
...
@@ -4,7 +4,7 @@ SafeCmdAlgNode::SafeCmdAlgNode(void) :
...
@@ -4,7 +4,7 @@ SafeCmdAlgNode::SafeCmdAlgNode(void) :
algorithm_base
::
IriBaseAlgorithm
<
SafeCmdAlgorithm
>
(),
algorithm_base
::
IriBaseAlgorithm
<
SafeCmdAlgorithm
>
(),
front_obstacle_
(
false
),
front_obstacle_
(
false
),
rear_obstacle_
(
false
),
rear_obstacle_
(
false
),
radius_
(
0.5
)
scale_
(
1
)
{
{
//init class attributes if necessary
//init class attributes if necessary
//this->loop_rate_ = 2;//in [Hz]
//this->loop_rate_ = 2;//in [Hz]
...
@@ -134,7 +134,7 @@ bool SafeCmdAlgNode::is_point_in_safe_area_(const sensor_msgs::LaserScan::ConstP
...
@@ -134,7 +134,7 @@ bool SafeCmdAlgNode::is_point_in_safe_area_(const sensor_msgs::LaserScan::ConstP
uint
i
=
0
;
uint
i
=
0
;
while
(
i
<
scan
->
ranges
.
size
())
while
(
i
<
scan
->
ranges
.
size
())
{
{
if
(
scan
->
ranges
[
i
]
<
radius
_
&&
scan
->
ranges
[
i
]
>
scan
->
range_min
)
if
(
scan
->
ranges
[
i
]
<
fabs
(
last_twist_
.
linear
.
x
)
*
scale
_
&&
scan
->
ranges
[
i
]
>
scan
->
range_min
)
return
true
;
return
true
;
i
++
;
i
++
;
}
}
...
...
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