Skip to content

Commit

Permalink
Use relative path in an urdf include to avoid confusion between inter…
Browse files Browse the repository at this point in the history
…nal and system headers (#1259)

Signed-off-by: Jose Luis Rivero <[email protected]>
  • Loading branch information
j-rivero authored Aug 30, 2023
1 parent b999425 commit 9f7a377
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/urdf/urdf_parser/check_urdf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
/* Author: Wim Meeussen */
#pragma warning(push, 0)

#include "urdf_parser/urdf_parser.h"
#include "../urdf_parser/urdf_parser.h"
#include <iostream>
#include <fstream>

Expand Down
2 changes: 1 addition & 1 deletion src/urdf/urdf_parser/joint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#include <urdf_model/joint.h>
// #include <console_bridge/console.h>
#include <tinyxml2.h>
#include <urdf_parser/urdf_parser.h>
#include "../urdf_parser/urdf_parser.h"

namespace urdf{

Expand Down
2 changes: 1 addition & 1 deletion src/urdf/urdf_parser/link.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
/* Author: Wim Meeussen */
#pragma warning(push, 0)

#include <urdf_parser/urdf_parser.h>
#include "../urdf_parser/urdf_parser.h"
#include <urdf_model/link.h>
#include <fstream>
#include <sstream>
Expand Down
6 changes: 5 additions & 1 deletion src/urdf/urdf_parser/model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@
#pragma warning(push, 0)

#include <vector>
#include "urdf_parser/urdf_parser.h"
// Use relative path to avoid confusion with urdf system headers (if present).
// The change to the relative path is only required to be present in this
// file given how MSVC include headers. See:
// https://github.com/gazebosim/sdformat/pull/1259/files#r1149821498
#include "../urdf_parser/urdf_parser.h"
// #include <console_bridge/console.h>
#include <fstream>

Expand Down
2 changes: 1 addition & 1 deletion src/urdf/urdf_parser/pose.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#include <algorithm>
// #include <console_bridge/console.h>
#include <tinyxml2.h>
#include <urdf_parser/urdf_parser.h>
#include "../urdf_parser/urdf_parser.h"

namespace urdf_export_helpers {

Expand Down
2 changes: 1 addition & 1 deletion src/urdf/urdf_parser/urdf_to_graphiz.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
/* Author: Wim Meeussen */
#pragma warning(push, 0)

#include "urdf_parser/urdf_parser.h"
#include "../urdf_parser/urdf_parser.h"
#include <iostream>
#include <fstream>

Expand Down
2 changes: 1 addition & 1 deletion src/urdf/urdf_parser/world.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

#include <urdf_world/world.h>
#include <urdf_model/model.h>
#include <urdf_parser/urdf_parser.h>
#include "../urdf_parser/urdf_parser.h"
#include <fstream>
#include <sstream>
#include <algorithm>
Expand Down

0 comments on commit 9f7a377

Please sign in to comment.