Browse Source

change map_lanetoxodr. add DirectJunction.

yuchuli 1 year ago
parent
commit
0333f24aa1

+ 222 - 0
src/common/common/xodr/OpenDrive/Junction.cpp

@@ -31,6 +31,9 @@ void Junction::SetName(string name)
 void Junction::SetId(string id)
 {	mId=id;	}
 
+void Junction::SetType(string strtype)
+{ mType = strtype;}
+
 
 /**
 * Adds a junction connection to the junction
@@ -82,6 +85,16 @@ unsigned int Junction::AddJunctionCrossPath(string id,string crossingRoad, strin
     mLastAddedJunctionCrossPath = mJunctionCrossPathVector.size() -1;
     return mLastAddedJunctionCrossPath;
 }
+
+unsigned int Junction::AddJunctionDirectConnection(	string id,	string linkedRoad)
+{
+    // Adds a new junction connection
+    mJunctionDirectConnectionVector.push_back(JunctionDirectConnection(id, linkedRoad));
+    // Saves the index of the newly added junction connection
+    mLastAddedJunctionDirectConnection = mJunctionDirectConnectionVector.size()-1;
+    return mLastAddedJunctionDirectConnection;
+}
+
 //--------------
 
 /**
@@ -130,6 +143,18 @@ unsigned int Junction::CloneJunctionPath(unsigned int index)
     return mLastAddedJunctionCrossPath;
 }
 
+unsigned int Junction::CloneJunctionDirectConnection(unsigned int index)
+{
+    if(index<mJunctionDirectConnectionVector.size()-1)
+        mJunctionDirectConnectionVector.insert(mJunctionDirectConnectionVector.begin()+index+1, mJunctionDirectConnectionVector[index]);
+    // or just push it to the back
+    else if(index==mJunctionDirectConnectionVector.size()-1)
+        mJunctionDirectConnectionVector.push_back(mJunctionDirectConnectionVector[index]);
+    // Save the last added record index
+    mLastAddedJunctionDirectConnection=index+1;
+    return mLastAddedJunctionDirectConnection;
+}
+
 /**
  * Methods used to delete child records from the respective vectors
  */
@@ -151,6 +176,11 @@ void Junction::DeleteJunctionCrossPath(unsigned int index)
     mJunctionCrossPathVector.erase(mJunctionCrossPathVector.begin()+index);
 }
 
+void Junction::DeleteJunctionDirectConnection(unsigned int index)
+{
+    mJunctionDirectConnectionVector.erase(mJunctionDirectConnectionVector.begin()+index);
+}
+
 /**
 * Return the name of the junction
 */
@@ -163,6 +193,11 @@ string Junction::GetName()
 string Junction::GetId()
 {	return mId;	}
 
+string Junction::GetType()
+{
+    return mType;
+}
+
 /**
 * Return the vector that stores junction connections
 * @return A pointer to std::vector of JunctionConnection type that stores junction connections
@@ -328,6 +363,32 @@ JunctionCrossPath* Junction::GetLastAddedJunctionCrossPath()
 }
 
 
+std::vector<JunctionDirectConnection>* Junction::GetJunctionDirectConnectionVector()
+{  return & mJunctionDirectConnectionVector;}
+
+unsigned int Junction::GetJunctionDirectConnectionCount()
+{ return mJunctionDirectConnectionVector.size();}
+
+JunctionDirectConnection * Junction::GetJunctionDirectConnection(unsigned int i)
+{ return &mJunctionDirectConnectionVector.at(i);}
+
+JunctionDirectConnection * Junction::GetLastJunctionDirectConnection()
+{
+    if(mJunctionDirectConnectionVector.size()>0)
+        return &mJunctionDirectConnectionVector.at(mJunctionDirectConnectionVector.size()-1);
+    else
+        return NULL;
+}
+
+JunctionDirectConnection * Junction::GetLastAddedJunctionDirectConnection()
+{
+    if(mLastAddedJunctionDirectConnection<mJunctionDirectConnectionVector.size())
+        return &mJunctionDirectConnectionVector.at(mLastAddedJunctionDirectConnection);
+    else
+        return NULL;
+}
+
+
 //--------------
 
 
@@ -771,3 +832,164 @@ void JunctionCrossPath::SetJunctionCrossPathEndLaneLink(JunctionCrossPathEndLane
 {
     mendLaneLink = xEnd;
 }
+
+
+/**
+* Constructor. Sets basic junction connection parameters
+* @param id ID within the junction
+* @param incomingRoad ID of the incoming road
+* @param connectingRoad ID of the connecting path
+* @param contactPoint Contact point on the connecting road (start / end)
+*/
+JunctionDirectConnection::JunctionDirectConnection(	string id, string linkedRoad)
+{
+    mId=id;
+    mIncomingRoad.clear();
+    mLinkedRoad=linkedRoad;
+    mContactPoint.clear();
+}
+
+/**
+* Set the ID parameter
+*/
+void JunctionDirectConnection::SetId(string id)
+{	mId=id;	}
+
+/**
+* Set the ID of the incoming road
+*/
+void JunctionDirectConnection::SetIncomingRoad(string incomingRoad)
+{
+    mIncomingRoad.clear();
+    mIncomingRoad.push_back(incomingRoad);
+}
+
+/**
+* Set the ID of the connecting path
+*/
+void JunctionDirectConnection::SetLinkedRoad(string linkedRoad)
+{	mLinkedRoad=linkedRoad;	}
+
+/**
+* Set the contact point parameter
+* @param contactPoint Contact point of the connecting road. Can be either start or end
+*/
+void JunctionDirectConnection::SetContactPoint(string contactPoint)
+{
+    mContactPoint.clear();
+    mContactPoint.push_back(contactPoint);
+}
+
+/**
+* Add a lane link record
+* @param from ID of the incoming lane
+* @param to ID of the connecting lane
+*/
+unsigned int JunctionDirectConnection::AddJunctionLaneLink(int from, int to)
+{
+    mJunctionLaneLinkVector.push_back(JunctionLaneLink(from, to));
+    mLastAddedJunctionLaneLink = mJunctionLaneLinkVector.size()-1;
+    return mLastAddedJunctionLaneLink;
+}
+//--------------
+
+/**
+ * Method used to clone child record in the respective vectors
+ */
+unsigned int JunctionDirectConnection::CloneJunctionLaneLink(unsigned int index)
+{
+    // Clone the object and insert it in the middle of the vector
+    if(index<mJunctionLaneLinkVector.size()-1)
+        mJunctionLaneLinkVector.insert(mJunctionLaneLinkVector.begin()+index+1, mJunctionLaneLinkVector[index]);
+    // or just push it to the back
+    else if(index==mJunctionLaneLinkVector.size()-1)
+        mJunctionLaneLinkVector.push_back(mJunctionLaneLinkVector[index]);
+    // Save the last added record index
+    mLastAddedJunctionLaneLink=index+1;
+    return mLastAddedJunctionLaneLink;
+}
+
+/**
+* Delete the lane link parameter at the provided index
+*/
+void JunctionDirectConnection::DeleteJunctionLaneLink(unsigned int index)
+{
+    mJunctionLaneLinkVector.erase(mJunctionLaneLinkVector.begin()+index);
+}
+
+
+/**
+* Get the ID parameter
+*/
+string JunctionDirectConnection::GetId()
+{	return mId;	}
+
+/**
+* Get the ID fo the incoming road
+*/
+int JunctionDirectConnection::GetIncomingRoad(string & incomingRoad)
+{
+    if(mIncomingRoad.size() == 0)return 0;
+    incomingRoad = mIncomingRoad[0];
+    return 1;	}
+
+/**
+* Get the ID of the connecting road
+*/
+string JunctionDirectConnection::GetLinkedRoad()
+{	return mLinkedRoad;	}
+
+/**
+* Get the contact point parameter
+*/
+int JunctionDirectConnection::GetContactPoint(string & contactPoint)
+{
+    if(mContactPoint.size() == 0)return 0;
+    contactPoint = mContactPoint[0];
+    return 1;	}
+
+/**
+* Return the vector that stores junction lane link records
+* @return A pointer to std::vector of JunctionLaneLink type that stores junction lane link records
+*/
+std::vector<JunctionLaneLink>* JunctionDirectConnection::GetJunctionLaneLinkVector()
+{	return &mJunctionLaneLinkVector;	}
+
+/**
+* Return the number of junction lane link records
+* @return An unsigned int that stores the number of junction lane link records
+*/
+unsigned int JunctionDirectConnection::GetJunctionLaneLinkCount()
+{	return mJunctionLaneLinkVector.size();	}
+
+/**
+* Return the pointer to a junction lane link record at provided index
+* @param i Index to the junction lane link record that is returned
+* @return A pointer to JunctionLaneLink object
+*/
+JunctionLaneLink* JunctionDirectConnection::GetJunctionLaneLink(unsigned int i)
+{	return &mJunctionLaneLinkVector.at(i);	}
+
+/**
+* Return the pointer to the last junction lane link record
+* @return A pointer to JunctionLaneLink object
+*/
+JunctionLaneLink* JunctionDirectConnection::GetLastJunctionLaneLink()
+{
+    if(mJunctionLaneLinkVector.size()>0)
+        return &mJunctionLaneLinkVector.at(mJunctionLaneLinkVector.size()-1);
+    else
+        return NULL;
+}
+
+/**
+* Return the pointer to the last added junction lane link record (which might not be the one from the end of the vector)
+* @return A pointer to JunctionLaneLink object
+*/
+JunctionLaneLink* JunctionDirectConnection::GetLastAddedJunctionLaneLink()
+{
+    if(mLastAddedJunctionLaneLink<mJunctionLaneLinkVector.size())
+        return &mJunctionLaneLinkVector.at(mLastAddedJunctionLaneLink);
+    else
+        return NULL;
+}

+ 139 - 0
src/common/common/xodr/OpenDrive/Junction.h

@@ -14,6 +14,7 @@ class JunctionPriorityRoad;
 class JunctionCrossPath;
 class JunctionCrossPathStartLaneLink;
 class JunctionCrossPathEndLaneLink;
+class JunctionDirectConnection;
 
 /**
  * Junction class. Holds all the junction information
@@ -31,6 +32,8 @@ private:
 	std::string mName;
 	std::string mId;
 
+    std::string mType = "default";
+
 	/**
 	 * Vector based parameters of the junction
 	 */
@@ -39,6 +42,8 @@ private:
 	std::vector<JunctionController> mJunctionControllerVector;
     std::vector<JunctionCrossPath> mJunctionCrossPathVector;
 
+    std::vector<JunctionDirectConnection> mJunctionDirectConnectionVector;
+
 public:
 
 	/**
@@ -49,6 +54,8 @@ public:
 	unsigned int mLastAddedJunctionController;
     unsigned int mLastAddedJunctionCrossPath;
 
+    unsigned int mLastAddedJunctionDirectConnection;
+
 	/**
 	 * Constructor. Sets basic junction parameters
 	 * @param name Name of the junction
@@ -65,6 +72,8 @@ public:
 	 */
 	void SetId(string id);
 
+    void SetType(string strtype);
+
 	/**
 	 * Adds a junction connection to the junction
 	 * @param id ID within the junction
@@ -74,6 +83,8 @@ public:
 	 */
 	unsigned int AddJunctionConnection(string id,	string incomingRoad, string connectingRoad, string contactPoint);
 
+
+
 	/**
 	 * Adds a priority parameter to the junction
 	 * @param high ID of the connecting road with higher priority
@@ -96,6 +107,7 @@ public:
      */
     unsigned int AddJunctionCrossPath(string id,string crossingRoad, string roadAtStart,string roadAtEnd,JunctionCrossPathStartLaneLink startLaneLink,JunctionCrossPathEndLaneLink endLaneLink);
 
+    unsigned int AddJunctionDirectConnection(string id,string linkedRoad);
 	/**
 	 * Clone the connection record
 	 * @param index Index of the record to clone
@@ -104,12 +116,14 @@ public:
 	unsigned int CloneJunctionPriority(unsigned int index);
 	unsigned int CloneJunctionController(unsigned int index);
     unsigned int CloneJunctionPath(unsigned int index);
+    unsigned int CloneJunctionDirectConnection(unsigned int index);
 
 
 	void DeleteJunctionConnection(unsigned int index);
 	void DeleteJunctionPriority(unsigned int index);
 	void DeleteJunctionController(unsigned int index);
     void DeleteJunctionCrossPath(unsigned int index);
+    void DeleteJunctionDirectConnection(unsigned int index);
 
 	/**
 	 * Return the name of the junction
@@ -121,6 +135,8 @@ public:
 	 */
 	string GetId();
 
+    string GetType();
+
 	/**
 	 * Return the vector that stores junction connections
 	 * @return A pointer to std::vector of JunctionConnection type that stores junction connections
@@ -222,6 +238,12 @@ public:
     JunctionCrossPath * GetLastJunctionCrossPath();
     JunctionCrossPath * GetLastAddedJunctionCrossPath();
 
+    std::vector<JunctionDirectConnection>* GetJunctionDirectConnectionVector();
+    unsigned int GetJunctionDirectConnectionCount();
+    JunctionDirectConnection * GetJunctionDirectConnection(unsigned int i);
+    JunctionDirectConnection * GetLastJunctionDirectConnection();
+    JunctionDirectConnection * GetLastAddedJunctionDirectConnection();
+
 };
 
 
@@ -575,7 +597,124 @@ public:
 };
 
 
+class JunctionDirectConnection
+{
+private:
+    /**
+     * Connection parameters
+     */
+    string mId;
+    string mLinkedRoad;
+
+    std::vector<string> mIncomingRoad;
+    std::vector<string> mContactPoint;	//Possible values: start / end
+
+    /**
+     * Lane linkage parameters vector
+     */
+    std::vector<JunctionLaneLink> mJunctionLaneLinkVector;
+public:
 
+    unsigned int mLastAddedJunctionLaneLink;
+
+    /**
+     * Constructor. Sets basic junction connection parameters
+     * @param id ID within the junction
+     * @param incomingRoad ID of the incoming road
+     * @param connectingRoad ID of the connecting path
+     * @param contactPoint Contact point on the connecting road (start / end)
+     */
+    JunctionDirectConnection(	string id, string linkedRoad);
+
+    /**
+     * Set the ID parameter
+     */
+    void SetId(string id);
+
+    /**
+     * Set the ID of the incoming road
+     */
+    void SetIncomingRoad(string incomingRoad);
+
+    /**
+     * Set the ID of the connecting path
+     */
+    void SetLinkedRoad(string linkedRoad);
+
+    /**
+     * Set the contact point parameter
+     * @param contactPoint Contact point of the connecting road. Can be either start or end
+     */
+    void SetContactPoint(string contactPoint);
+
+    /**
+     * Add a lane link record
+     * @param from ID of the incoming lane
+     * @param to ID of the connecting lane
+     */
+    unsigned int AddJunctionLaneLink(int from, int to);
+
+    //clone elements
+    unsigned int CloneJunctionLaneLink(unsigned int index);
+
+    /**
+     * Delete the lane link parameter at the provided index
+     */
+    void DeleteJunctionLaneLink(unsigned int index);
+
+    /**
+     * Get the ID parameter
+     */
+    string GetId();
+
+    /**
+     * Get the ID fo the incoming road
+     */
+    int GetIncomingRoad(string & incomingRoad);
+
+    /**
+     * Get the ID of the connecting road
+     */
+    string GetLinkedRoad();
+
+    /**
+     * Get the contact point parameter
+     */
+    int GetContactPoint(string & contactPoint);
+
+    /**
+     * Return the vector that stores junction lane link records
+     * @return A pointer to std::vector of JunctionLaneLink type that stores junction lane link records
+     */
+    std::vector<JunctionLaneLink>* GetJunctionLaneLinkVector();
+
+    /**
+     * Return the number of junction lane link records
+     * @return An unsigned int that stores the number of junction lane link records
+     */
+    unsigned int GetJunctionLaneLinkCount();
+
+    /**
+     * Return the pointer to a junction lane link record at provided index
+     * @param i Index to the junction lane link record that is returned
+     * @return A pointer to JunctionLaneLink object
+     */
+    JunctionLaneLink* GetJunctionLaneLink(unsigned int);
+
+    /**
+     * Return the pointer to the last junction lane link record
+     * @return A pointer to JunctionLaneLink object
+     */
+    JunctionLaneLink* GetLastJunctionLaneLink();
+
+    /**
+     * Return the pointer to the last added junction lane link record (which might not be the one from the end of the vector)
+     * @return A pointer to JunctionLaneLink object
+     */
+    JunctionLaneLink* GetLastAddedJunctionLaneLink();
+
+
+};
 
 
 

+ 80 - 0
src/common/common/xodr/OpenDrive/OpenDriveXmlParser.cpp

@@ -2984,6 +2984,7 @@ bool OpenDriveXmlParser::ReadJunction (TiXmlElement *node)
 {	
 	string name;
 	string id;
+    string type = "default";
 
 	int checker=TIXML_SUCCESS;
 
@@ -3000,17 +3001,35 @@ bool OpenDriveXmlParser::ReadJunction (TiXmlElement *node)
         name = "";
     }
 
+    node->QueryStringAttribute("type",&type);
+
 	mOpenDrive->AddJunction(name,id);
 	Junction* junction=mOpenDrive->GetLastJunction();
+    if(type != "default")
+    {
+        junction->SetType(type);
+    }
 
 	//Read connection parameters and add them to the lane if available
 	TiXmlElement *subNode=node->FirstChildElement("connection");
 
+    if(type == "default")
+    {
 	while (subNode)
 	{
 		ReadJunctionConnection(junction, subNode);
 		subNode=subNode->NextSiblingElement("connection");
 	}
+    }
+
+    if(type == "direct")
+    {
+    while (subNode)
+    {
+        ReadJunctionDirectConnection(junction, subNode);
+        subNode=subNode->NextSiblingElement("connection");
+    }
+    }
 
 
 	//Read connection parameters and add them to the lane if available
@@ -3095,6 +3114,67 @@ bool OpenDriveXmlParser::ReadJunctionConnectionLaneLink (JunctionConnection* jun
 	return true;
 }
 
+bool OpenDriveXmlParser::ReadJunctionDirectConnectionLaneLink (JunctionDirectConnection* junctionDirectConnection, TiXmlElement *node)
+{
+    int from;
+    int to;
+
+    int checker=TIXML_SUCCESS;
+    checker+=node->QueryIntAttribute("from",&from);
+    checker+=node->QueryIntAttribute("to",&to);
+    if (checker!=TIXML_SUCCESS)
+    {
+        cout<<"Error parsing Junction Lane Link attributes"<<endl;
+        return false;
+    }
+
+    junctionDirectConnection->AddJunctionLaneLink(from,to);
+    return true;
+}
+
+bool OpenDriveXmlParser::ReadJunctionDirectConnection (Junction* junction, TiXmlElement *node)
+{
+    string id;
+    string linkedRoad;
+
+    string incomingRoad;
+    string contactPoint;
+
+    int checker=TIXML_SUCCESS;
+    checker+=node->QueryStringAttribute("id",&id);
+    checker+=node->QueryStringAttribute("linkedRoad",&linkedRoad);
+
+    if (checker!=TIXML_SUCCESS)
+    {
+        cout<<"Error parsing Junction Direct Connection attributes"<<endl;
+        return false;
+    }
+
+    junction->AddJunctionDirectConnection(id,linkedRoad);
+    JunctionDirectConnection* junctionDirectConnetion = junction->GetLastJunctionDirectConnection();
+
+
+    if(node->QueryStringAttribute("incomingRoad",&incomingRoad) == TIXML_SUCCESS)
+    {
+        junctionDirectConnetion->SetIncomingRoad(incomingRoad);
+    }
+
+    if(node->QueryStringAttribute("contactPoint",&contactPoint) == TIXML_SUCCESS)
+    {
+        junctionDirectConnetion->SetContactPoint(contactPoint);
+    }
+
+    TiXmlElement *subNode=node->FirstChildElement("laneLink");
+
+    while (subNode)
+    {
+        ReadJunctionDirectConnectionLaneLink(junctionDirectConnetion, subNode);
+        subNode=subNode->NextSiblingElement("laneLink");
+    }
+
+    return true;
+}
+
 bool OpenDriveXmlParser::ReadJunctionPriority (Junction* junction, TiXmlElement *node)
 {
 	string high;

+ 2 - 0
src/common/common/xodr/OpenDrive/OpenDriveXmlParser.h

@@ -130,6 +130,8 @@ public:
 	bool ReadJunction (TiXmlElement *node);
 	bool ReadJunctionConnection (Junction* junction, TiXmlElement *node);
 	bool ReadJunctionConnectionLaneLink (JunctionConnection* junctionConnection, TiXmlElement *node);
+    bool ReadJunctionDirectConnectionLaneLink (JunctionDirectConnection* junctionDirectConnection, TiXmlElement *node);
+    bool ReadJunctionDirectConnection (Junction* junction, TiXmlElement *node);
 	//--------------
 
 	bool ReadJunctionPriority (Junction* junction, TiXmlElement *node);

+ 77 - 1
src/common/common/xodr/OpenDrive/OpenDriveXmlWriter.cpp

@@ -2415,18 +2415,30 @@ bool OpenDriveXmlWriter::WriteJunction (TiXmlElement *node, Junction *junction)
 {
 	string name;
 	string id;
+    string type = "default";
 
 	name = junction->GetName();
 	id = junction->GetId();
 
+    type = junction->GetType();
+
 	TiXmlElement *nodeJunction = new TiXmlElement("junction");
 	node->LinkEndChild(nodeJunction);
 
 	nodeJunction->SetAttribute("name",name);
 	nodeJunction->SetAttribute("id",id);
 
+    if(type == "default")
+    {
 	//Connections
-	WriteJunctionConnection(nodeJunction, junction);
+        WriteJunctionConnection(nodeJunction, junction);
+    }
+
+    if(type == "direct")
+    {
+        nodeJunction->SetAttribute("type",type);
+        WriteJunctionDirectConnection(nodeJunction,junction);
+    }
 
 	//Priorities
 	WriteJunctionPriority(nodeJunction, junction);
@@ -2493,6 +2505,70 @@ bool OpenDriveXmlWriter::WriteJunctionConnectionLaneLink (TiXmlElement *node, Ju
 	return true;
 }
 
+bool OpenDriveXmlWriter::WriteJunctionDirectConnection (TiXmlElement *node, Junction* junction)
+{
+    string id;
+    string incomingRoad;
+    string linkedRoad;
+    string contactPoint;
+
+    unsigned int junctionDirectConnectionCount = junction->GetJunctionDirectConnectionCount();
+    for(unsigned int i=0; i<junctionDirectConnectionCount; i++)
+    {
+        JunctionDirectConnection *lJunctionDirectConnection = junction->GetJunctionDirectConnection(i);
+
+        id = lJunctionDirectConnection->GetId();
+        linkedRoad = lJunctionDirectConnection->GetLinkedRoad();
+
+
+        TiXmlElement *nodeJunctionDirectConnection = new TiXmlElement("connection");
+        node->LinkEndChild(nodeJunctionDirectConnection);
+
+        nodeJunctionDirectConnection->SetAttribute("id",id);
+        nodeJunctionDirectConnection->SetAttribute("linkedRoad",linkedRoad);
+
+
+
+        if(lJunctionDirectConnection->GetIncomingRoad(incomingRoad) == 1)
+        {
+            nodeJunctionDirectConnection->SetAttribute("incomingRoad",incomingRoad);
+        }
+
+        if(lJunctionDirectConnection->GetContactPoint(contactPoint) == 1)
+        {
+            nodeJunctionDirectConnection->SetAttribute("contactPoint",contactPoint);
+        }
+
+
+        //Lane links
+        WriteJunctionDirectConnectionLaneLink(nodeJunctionDirectConnection, lJunctionDirectConnection);
+    }
+
+    return true;
+}
+
+bool OpenDriveXmlWriter::WriteJunctionDirectConnectionLaneLink (TiXmlElement *node, JunctionDirectConnection* junctionDirectConnection)
+{
+    int from;
+    int to;
+
+    unsigned int junctionLaneLinkCount = junctionDirectConnection->GetJunctionLaneLinkCount();
+    for(unsigned int i=0; i<junctionLaneLinkCount; i++)
+    {
+        JunctionLaneLink *lJunctionLaneLink = junctionDirectConnection->GetJunctionLaneLink(i);
+
+        from = lJunctionLaneLink->GetFrom();
+        to = lJunctionLaneLink->GetTo();
+
+        TiXmlElement *nodeJunctionLaneLink = new TiXmlElement("laneLink");
+        node->LinkEndChild(nodeJunctionLaneLink);
+
+        nodeJunctionLaneLink->SetAttribute("from",from);
+        nodeJunctionLaneLink->SetAttribute("to",to);
+    }
+    return true;
+}
+
 bool OpenDriveXmlWriter::WriteJunctionPriority (TiXmlElement *node, Junction* junction)
 {
 	string high;

+ 3 - 1
src/common/common/xodr/OpenDrive/OpenDriveXmlWriter.h

@@ -124,7 +124,9 @@ public:
 
 	bool WriteJunction (TiXmlElement *node, Junction *junction);
 	bool WriteJunctionConnection (TiXmlElement *node, Junction* junction);
-	bool WriteJunctionConnectionLaneLink (TiXmlElement *node, JunctionConnection* junctionConnection);
+    bool WriteJunctionConnectionLaneLink (TiXmlElement *node, JunctionConnection* junctionConnection);
+    bool WriteJunctionDirectConnection (TiXmlElement *node, Junction* junction);
+    bool WriteJunctionDirectConnectionLaneLink (TiXmlElement *node, JunctionDirectConnection* junctionDirectConnection);
 	//--------------
 
 	bool WriteJunctionPriority (TiXmlElement *node, Junction* junction);