Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hpp-manipulation
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
Container Registry
Model registry
Operate
Environments
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
Guilhem Saurel
hpp-manipulation
Commits
cd722dc2
Commit
cd722dc2
authored
10 years ago
by
Joseph Mirabel
Committed by
Joseph Mirabel
10 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Roadmap do not duplicate NodeHistogram
parent
ca7ba091
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/hpp/manipulation/roadmap.hh
+2
-1
2 additions, 1 deletion
include/hpp/manipulation/roadmap.hh
src/roadmap.cc
+12
-3
12 additions, 3 deletions
src/roadmap.cc
with
14 additions
and
4 deletions
include/hpp/manipulation/roadmap.hh
+
2
−
1
View file @
cd722dc2
...
@@ -55,9 +55,10 @@ namespace hpp {
...
@@ -55,9 +55,10 @@ namespace hpp {
Roadmap
(
const
core
::
DistancePtr_t
&
distance
,
const
core
::
DevicePtr_t
&
robot
);
Roadmap
(
const
core
::
DistancePtr_t
&
distance
,
const
core
::
DevicePtr_t
&
robot
);
private:
private:
typedef
std
::
list
<
graph
::
HistogramPtr_t
>
Histograms
;
/// Keep track of the leaf that are explored.
/// Keep track of the leaf that are explored.
/// There should be one histogram per foliation.
/// There should be one histogram per foliation.
std
::
vector
<
graph
::
Histogram
Ptr_t
>
histograms_
;
Histogram
s
histograms_
;
};
};
}
// namespace manipulation
}
// namespace manipulation
}
// namespace hpp
}
// namespace hpp
...
...
This diff is collapsed.
Click to expand it.
src/roadmap.cc
+
12
−
3
View file @
cd722dc2
...
@@ -14,6 +14,8 @@
...
@@ -14,6 +14,8 @@
// received a copy of the GNU Lesser General Public License along with
// received a copy of the GNU Lesser General Public License along with
// hpp-manipulation. If not, see <http://www.gnu.org/licenses/>.
// hpp-manipulation. If not, see <http://www.gnu.org/licenses/>.
#include
<hpp/util/pointer.hh>
#include
"hpp/manipulation/roadmap.hh"
#include
"hpp/manipulation/roadmap.hh"
namespace
hpp
{
namespace
hpp
{
...
@@ -29,8 +31,8 @@ namespace hpp {
...
@@ -29,8 +31,8 @@ namespace hpp {
void
Roadmap
::
clear
()
void
Roadmap
::
clear
()
{
{
Parent
::
clear
();
Parent
::
clear
();
std
::
vector
<
graph
::
Histogram
Ptr_t
>
newHistograms
;
Histogram
s
newHistograms
;
std
::
vector
<
graph
::
Histogram
Ptr_t
>
::
iterator
it
;
Histogram
s
::
iterator
it
;
for
(
it
=
histograms_
.
begin
();
it
!=
histograms_
.
end
();
it
++
)
{
for
(
it
=
histograms_
.
begin
();
it
!=
histograms_
.
end
();
it
++
)
{
newHistograms
.
push_back
((
*
it
)
->
clone
());
newHistograms
.
push_back
((
*
it
)
->
clone
());
}
}
...
@@ -45,7 +47,7 @@ namespace hpp {
...
@@ -45,7 +47,7 @@ namespace hpp {
void
Roadmap
::
statInsert
(
ConfigurationIn_t
config
)
void
Roadmap
::
statInsert
(
ConfigurationIn_t
config
)
{
{
std
::
vector
<
graph
::
Histogram
Ptr_t
>
::
iterator
it
;
Histogram
s
::
iterator
it
;
for
(
it
=
histograms_
.
begin
();
it
!=
histograms_
.
end
();
it
++
)
{
for
(
it
=
histograms_
.
begin
();
it
!=
histograms_
.
end
();
it
++
)
{
(
*
it
)
->
add
(
config
);
(
*
it
)
->
add
(
config
);
}
}
...
@@ -58,6 +60,13 @@ namespace hpp {
...
@@ -58,6 +60,13 @@ namespace hpp {
void
Roadmap
::
constraintGraph
(
const
graph
::
GraphPtr_t
&
graph
)
void
Roadmap
::
constraintGraph
(
const
graph
::
GraphPtr_t
&
graph
)
{
{
Histograms
::
iterator
it
=
histograms_
.
begin
();
for
(;
it
!=
histograms_
.
end
();)
{
if
(
HPP_DYNAMIC_PTR_CAST
(
graph
::
NodeHistogram
,
*
it
))
it
=
histograms_
.
erase
(
it
);
else
it
++
;
}
histograms_
.
push_back
(
graph
::
HistogramPtr_t
(
new
graph
::
NodeHistogram
(
graph
)));
histograms_
.
push_back
(
graph
::
HistogramPtr_t
(
new
graph
::
NodeHistogram
(
graph
)));
}
}
}
// namespace manipulation
}
// namespace manipulation
...
...
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