Commit 7123f531 authored by Sergi Hernandez's avatar Sergi Hernandez
Browse files

Solved some minor bugs.

parent 5ad9412d
......@@ -198,7 +198,7 @@ class COpendriveLane
*
* \return the road mark identifier at the right side of the lane.
*/
opendrive_mark_t get_left_road_mark(void) const;
opendrive_mark_t get_right_road_mark(void) const;
/**
* \brief Returns the width of the lane
*
......
......@@ -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<previous.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
......
......@@ -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;
......
......@@ -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];
......
......@@ -489,7 +489,7 @@ unsigned int COpendriveRoadNode::get_closest_link_index(TOpendriveWorldPose &pos
return closest_index;
}
const CopendriveLink &COpendriveRoadNode::get_closest_link(TOpendriveWorldPose &pose,double &distance,bool only_lanes,double angle_tol)const
const COpendriveLink &COpendriveRoadNode::get_closest_link(TOpendriveWorldPose &pose,double &distance,bool only_lanes,double angle_tol)const
{
unsigned int closest_index;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment