Skip to content

Commit

Permalink
[urdf] Fix urdf header include on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
jslee02 committed Mar 14, 2024
1 parent d1ac0f9 commit ae73135
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 12 deletions.
4 changes: 1 addition & 3 deletions dart/utils/urdf/DartLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@
#include <iostream>
#include <map>

#include <urdf_parser/urdf_parser.h>
#include <urdf_world/world.h>

#include "dart/dynamics/BodyNode.hpp"
#include "dart/dynamics/BoxShape.hpp"
#include "dart/dynamics/CylinderShape.hpp"
Expand All @@ -55,6 +52,7 @@
#include "dart/simulation/World.hpp"
#include "dart/utils/DartResourceRetriever.hpp"
#include "dart/utils/urdf/BackwardCompatibility.hpp"
#include "dart/utils/urdf/IncludeUrdf.hpp"
#include "dart/utils/urdf/urdf_world_parser.hpp"

namespace dart {
Expand Down
45 changes: 45 additions & 0 deletions dart/utils/urdf/IncludeUrdf.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* Copyright (c) 2011-2024, The DART development contributors
* All rights reserved.
*
* The list of contributors can be found at:
* https://github.com/dartsim/dart/blob/main/LICENSE
*
* This file is provided under the following "BSD-style" License:
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
* conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/

#pragma once

// clang-format off

#include <dart/common/IncludeWindows.hpp>

#include <urdf_model/model.h>
#include <urdf_model/pose.h>
#include <urdf_model/twist.h>
#include <urdf_parser/urdf_parser.h>
#include <urdf_world/world.h>

// clang-format on
5 changes: 1 addition & 4 deletions dart/utils/urdf/urdf_world_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,9 @@
#include <sstream>

#include <tinyxml2.h>
#include <urdf_model/model.h>
#include <urdf_model/pose.h>
#include <urdf_parser/urdf_parser.h>
#include <urdf_world/world.h>

#include "dart/common/Console.hpp"
#include "dart/utils/urdf/IncludeUrdf.hpp"

const bool debug = false;

Expand Down
6 changes: 1 addition & 5 deletions dart/utils/urdf/urdf_world_parser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,10 @@

#include <string>

#include <urdf_model/model.h>
#include <urdf_model/pose.h>
#include <urdf_model/twist.h>
#include <urdf_world/world.h>

#include "dart/common/ResourceRetriever.hpp"
#include "dart/common/Uri.hpp"
#include "dart/utils/urdf/BackwardCompatibility.hpp"
#include "dart/utils/urdf/IncludeUrdf.hpp"

namespace dart {
namespace utils {
Expand Down

0 comments on commit ae73135

Please sign in to comment.