Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mobile_robotics
autonomous_driving
autonomous_driving_tools
Commits
7123f531
Commit
7123f531
authored
Feb 06, 2021
by
Sergi Hernandez
Browse files
Solved some minor bugs.
parent
5ad9412d
Changes
5
Hide whitespace changes
Inline
Side-by-side
include/opendrive_lane.h
View file @
7123f531
...
...
@@ -198,7 +198,7 @@ class COpendriveLane
*
* \return the road mark identifier at the right side of the lane.
*/
opendrive_mark_t
get_
lef
t_road_mark
(
void
)
const
;
opendrive_mark_t
get_
righ
t_road_mark
(
void
)
const
;
/**
* \brief Returns the width of the lane
*
...
...
src/opendrive_lane.cpp
View file @
7123f531
...
...
@@ -903,11 +903,11 @@ std::ostream& operator<<(std::ostream& out, COpendriveLane &lane)
out
<<
" width: "
<<
lane
.
get_width
()
<<
std
::
endl
;
out
<<
" speed: "
<<
lane
.
get_speed
()
<<
std
::
endl
;
out
<<
" Previous lanes: "
<<
std
::
endl
;
for
(
unsigned
int
i
=
0
;
i
<
prev
ious
.
size
();
i
++
)
out
<<
" Lane "
<<
this
->
previous
[
i
]
->
id
<<
" in road segment "
<<
this
->
previous
[
i
]
->
segment
->
get_name
()
<<
std
::
endl
;
for
(
unsigned
int
i
=
0
;
i
<
lane
.
prev
.
size
();
i
++
)
out
<<
" Lane "
<<
lane
.
prev
[
i
]
->
id
<<
" in road segment "
<<
lane
.
prev
[
i
]
->
segment
->
get_name
()
<<
std
::
endl
;
out
<<
" Next lanes: "
<<
std
::
endl
;
for
(
unsigned
int
i
=
0
;
i
<
next
.
size
();
i
++
)
out
<<
" Lane "
<<
this
->
next
[
i
]
->
id
<<
" in road segment "
<<
this
->
next
[
i
]
->
segment
->
get_name
()
<<
std
::
endl
;
for
(
unsigned
int
i
=
0
;
i
<
lane
.
next
.
size
();
i
++
)
out
<<
" Lane "
<<
lane
.
next
[
i
]
->
id
<<
" in road segment "
<<
lane
.
next
[
i
]
->
segment
->
get_name
()
<<
std
::
endl
;
if
(
lane
.
segment
!=
NULL
)
out
<<
" Parent road segment: "
<<
lane
.
segment
->
get_name
()
<<
std
::
endl
;
else
...
...
src/opendrive_link.cpp
View file @
7123f531
...
...
@@ -198,7 +198,7 @@ const COpendriveLane &COpendriveLink::get_parent_lane(void) const
}
}
bool
COpendriveLink
::
is_lane_link
(
void
)
bool
COpendriveLink
::
is_lane_link
(
void
)
const
{
if
(
this
->
lane
==
NULL
)
return
false
;
...
...
src/opendrive_road.cpp
View file @
7123f531
...
...
@@ -837,6 +837,7 @@ std::vector<unsigned int> COpendriveRoad::get_sub_road(std::vector<unsigned int>
COpendriveLink
*
link
;
std
::
vector
<
unsigned
int
>
new_path_nodes
;
unsigned
int
link_index
;
double
distance
;
new_path_nodes
.
resize
(
path_nodes
.
size
());
...
...
@@ -862,7 +863,7 @@ std::vector<unsigned int> COpendriveRoad::get_sub_road(std::vector<unsigned int>
}
// add the last segment
node
=
this
->
nodes
[
path_nodes
[
path_nodes
.
size
()
-
1
]];
link_index
=
node
->
get_closest_link
(
end_pose
);
link_index
=
node
->
get_closest_link
_index
(
end_pose
,
distance
);
if
(
link_index
==
(
unsigned
int
)
-
1
)
throw
CException
(
_HERE_
,
"The provided path has unconnected nodes"
);
link
=
node
->
links
[
link_index
];
...
...
src/opendrive_road_node.cpp
View file @
7123f531
...
...
@@ -489,7 +489,7 @@ unsigned int COpendriveRoadNode::get_closest_link_index(TOpendriveWorldPose &pos
return
closest_index
;
}
const
C
o
pendriveLink
&
COpendriveRoadNode
::
get_closest_link
(
TOpendriveWorldPose
&
pose
,
double
&
distance
,
bool
only_lanes
,
double
angle_tol
)
const
const
C
O
pendriveLink
&
COpendriveRoadNode
::
get_closest_link
(
TOpendriveWorldPose
&
pose
,
double
&
distance
,
bool
only_lanes
,
double
angle_tol
)
const
{
unsigned
int
closest_index
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment