Skip to content

Commit

Permalink
Move shared data to trajopt_common
Browse files Browse the repository at this point in the history
  • Loading branch information
Levi-Armstrong committed Jun 30, 2023
1 parent 4ac450c commit 5589fa8
Show file tree
Hide file tree
Showing 491 changed files with 318 additions and 526 deletions.
14 changes: 1 addition & 13 deletions trajopt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,7 @@ target_cxx_version(${PROJECT_NAME} PUBLIC VERSION ${TRAJOPT_CXX_VERSION})
target_include_directories(${PROJECT_NAME} PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:include>")

# Install test data directory for use in other packages
add_library(${PROJECT_NAME}_test_data INTERFACE)
target_link_libraries(${PROJECT_NAME}_test_data INTERFACE)
target_compile_definitions(
${PROJECT_NAME}_test_data INTERFACE ${TRAJOPT_COMPILE_DEFINITIONS}
TRAJOPT_DIR="${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}")
target_cxx_version(${PROJECT_NAME}_test_data INTERFACE VERSION ${TRAJOPT_CXX_VERSION})

configure_package(NAMESPACE trajopt TARGETS ${PROJECT_NAME} ${PROJECT_NAME}_test_data)

foreach(dir test/data)
install(DIRECTORY ${dir}/ DESTINATION share/${PROJECT_NAME}/${dir})
endforeach()
configure_package(NAMESPACE trajopt TARGETS ${PROJECT_NAME})

# Mark cpp header files for installation
install(
Expand Down
45 changes: 18 additions & 27 deletions trajopt/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ include(GoogleTest)
macro(add_gtest test_name test_file)
add_executable(${test_name} ${test_file})
target_compile_options(${test_name} PRIVATE ${TRAJOPT_COMPILE_OPTIONS_PRIVATE} ${TRAJOPT_COMPILE_OPTIONS_PUBLIC})
target_compile_definitions(${test_name} PRIVATE ${TRAJOPT_COMPILE_DEFINITIONS} TRAJOPT_DIR="${CMAKE_SOURCE_DIR}")
target_compile_definitions(${test_name} PRIVATE ${TRAJOPT_COMPILE_DEFINITIONS})
target_cxx_version(${test_name} PRIVATE VERSION ${TRAJOPT_CXX_VERSION})
target_clang_tidy(${test_name} ENABLE ${TRAJOPT_ENABLE_CLANG_TIDY})
target_link_libraries(
Expand Down Expand Up @@ -70,29 +70,20 @@ add_gtest(${PROJECT_NAME}_cast_cost_octomap_unit cast_cost_octomap_unit.cpp)
add_gtest(${PROJECT_NAME}_simple_collision_unit simple_collision_unit.cpp)
add_gtest(${PROJECT_NAME}_cart_position_optimization_unit cart_position_optimization_unit.cpp)

## This is for comparison and should be moved to trajopt
#add_executable(${PROJECT_NAME}_cart_position_optimization_trajopt_sco_unit
# cart_position_optimization_trajopt_sco_unit.cpp)
#target_compile_options(${PROJECT_NAME}_cart_position_optimization_trajopt_sco_unit
# PRIVATE ${TRAJOPT_COMPILE_OPTIONS_PRIVATE} ${TRAJOPT_COMPILE_OPTIONS_PUBLIC})
#target_compile_definitions(${PROJECT_NAME}_cart_position_optimization_trajopt_sco_unit
# PRIVATE ${TRAJOPT_COMPILE_DEFINITIONS} TRAJOPT_IFOPT_DIR="${CMAKE_SOURCE_DIR}")
#target_cxx_version(${PROJECT_NAME}_cart_position_optimization_trajopt_sco_unit PRIVATE VERSION ${TRAJOPT_CXX_VERSION})
#target_clang_tidy(${PROJECT_NAME}_cart_position_optimization_trajopt_sco_unit ENABLE ${TRAJOPT_ENABLE_CLANG_TIDY})
#target_link_libraries(
# ${PROJECT_NAME}_cart_position_optimization_trajopt_sco_unit
# ${PROJECT_NAME}
# console_bridge
# ifopt::ifopt_ipopt
# trajopt::trajopt_ifopt
# trajopt::trajopt_test_data
# trajopt::trajopt
# GTest::GTest
# GTest::Main)
#target_include_directories(${PROJECT_NAME}_cart_position_optimization_trajopt_sco_unit
# PRIVATE "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>" ${GTEST_INCLUDE_DIRS})
#target_include_directories(${PROJECT_NAME}_cart_position_optimization_trajopt_sco_unit SYSTEM
# PRIVATE ${PCL_INCLUDE_DIRS})
#add_gtest_discover_tests(${PROJECT_NAME}_cart_position_optimization_trajopt_sco_unit)
#add_dependencies(${PROJECT_NAME}_cart_position_optimization_trajopt_sco_unit ${PROJECT_NAME})
#add_dependencies(run_tests ${PROJECT_NAME}_cart_position_optimization_trajopt_sco_unit)
# This is for comparison and should be moved to trajopt
# add_executable(${PROJECT_NAME}_cart_position_optimization_trajopt_sco_unit
# cart_position_optimization_trajopt_sco_unit.cpp)
# target_compile_options(${PROJECT_NAME}_cart_position_optimization_trajopt_sco_unit PRIVATE
# ${TRAJOPT_COMPILE_OPTIONS_PRIVATE} ${TRAJOPT_COMPILE_OPTIONS_PUBLIC})
# target_compile_definitions(${PROJECT_NAME}_cart_position_optimization_trajopt_sco_unit PRIVATE
# ${TRAJOPT_COMPILE_DEFINITIONS} TRAJOPT_IFOPT_DIR="${CMAKE_SOURCE_DIR}")
# target_cxx_version(${PROJECT_NAME}_cart_position_optimization_trajopt_sco_unit PRIVATE VERSION ${TRAJOPT_CXX_VERSION})
# target_clang_tidy(${PROJECT_NAME}_cart_position_optimization_trajopt_sco_unit ENABLE ${TRAJOPT_ENABLE_CLANG_TIDY})
# target_link_libraries( ${PROJECT_NAME}_cart_position_optimization_trajopt_sco_unit ${PROJECT_NAME} console_bridge
# ifopt::ifopt_ipopt trajopt::trajopt_ifopt trajopt::trajopt_test_data trajopt::trajopt GTest::GTest GTest::Main)
# target_include_directories(${PROJECT_NAME}_cart_position_optimization_trajopt_sco_unit PRIVATE
# "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>" ${GTEST_INCLUDE_DIRS})
# target_include_directories(${PROJECT_NAME}_cart_position_optimization_trajopt_sco_unit SYSTEM PRIVATE
# ${PCL_INCLUDE_DIRS}) add_gtest_discover_tests(${PROJECT_NAME}_cart_position_optimization_trajopt_sco_unit)
# add_dependencies(${PROJECT_NAME}_cart_position_optimization_trajopt_sco_unit ${PROJECT_NAME})
# add_dependencies(run_tests ${PROJECT_NAME}_cart_position_optimization_trajopt_sco_unit)
2 changes: 1 addition & 1 deletion trajopt/test/benchmarks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ find_package(osqp REQUIRED)
macro(add_benchmark benchmark_name benchmark_file)
add_executable(${benchmark_name} ${benchmark_file})
target_compile_options(${benchmark_name} PRIVATE ${TRAJOPT_COMPILE_OPTIONS_PRIVATE} ${TRAJOPT_COMPILE_OPTIONS_PUBLIC})
target_compile_definitions(${benchmark_name} PRIVATE ${TRAJOPT_COMPILE_DEFINITIONS} TRAJOPT_DIR="${CMAKE_SOURCE_DIR}")
target_compile_definitions(${benchmark_name} PRIVATE ${TRAJOPT_COMPILE_DEFINITIONS})
target_cxx_version(${benchmark_name} PRIVATE VERSION ${TRAJOPT_CXX_VERSION})
target_clang_tidy(${benchmark_name} ENABLE ${TRAJOPT_ENABLE_CLANG_TIDY})
target_link_libraries(
Expand Down
18 changes: 8 additions & 10 deletions trajopt/test/benchmarks/solve_benchmarks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ TESSERACT_COMMON_IGNORE_WARNINGS_POP
#include <trajopt_common/logging.hpp>
#include <trajopt_common/stl_to_string.hpp>

#include "../trajopt_test_utils.hpp"

using namespace trajopt;
using namespace std;
using namespace trajopt_common;
Expand Down Expand Up @@ -98,11 +96,11 @@ int main(int argc, char** argv)
// Simple Collision Solve
//////////////////////////////////////
{
Json::Value root = readJsonFile(std::string(TRAJOPT_DIR) + "/test/data/config/simple_collision_test.json");
boost::filesystem::path urdf_file(std::string(TRAJOPT_DIR) + "/test/data/spherebot.urdf");
boost::filesystem::path srdf_file(std::string(TRAJOPT_DIR) + "/test/data/spherebot.srdf");
Json::Value root = readJsonFile(std::string(TRAJOPT_DATA_DIR) + "/config/simple_collision_test.json");
boost::filesystem::path urdf_file(std::string(TRAJOPT_DATA_DIR) + "/spherebot.urdf");
boost::filesystem::path srdf_file(std::string(TRAJOPT_DATA_DIR) + "/spherebot.srdf");

ResourceLocator::Ptr locator = std::make_shared<TrajOptSupportResourceLocator>();
ResourceLocator::Ptr locator = std::make_shared<tesseract_common::GeneralResourceLocator>();
auto env = std::make_shared<Environment>();
env->init(urdf_file, srdf_file, locator);

Expand Down Expand Up @@ -134,11 +132,11 @@ int main(int argc, char** argv)
// Planning Solve
//////////////////////////////////////
{
Json::Value root = readJsonFile(std::string(TRAJOPT_DIR) + "/test/data/config/arm_around_table.json");
tesseract_common::fs::path urdf_file(std::string(TRAJOPT_DIR) + "/test/data/arm_around_table.urdf");
tesseract_common::fs::path srdf_file(std::string(TRAJOPT_DIR) + "/test/data/pr2.srdf");
Json::Value root = readJsonFile(std::string(TRAJOPT_DATA_DIR) + "/config/arm_around_table.json");
tesseract_common::fs::path urdf_file(std::string(TRAJOPT_DATA_DIR) + "/arm_around_table.urdf");
tesseract_common::fs::path srdf_file(std::string(TRAJOPT_DATA_DIR) + "/pr2.srdf");

ResourceLocator::Ptr locator = std::make_shared<TrajOptSupportResourceLocator>();
ResourceLocator::Ptr locator = std::make_shared<tesseract_common::GeneralResourceLocator>();
auto env = std::make_shared<Environment>();
env->init(urdf_file, srdf_file, locator);

Expand Down
7 changes: 3 additions & 4 deletions trajopt/test/cart_position_optimization_unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ TRAJOPT_IGNORE_WARNINGS_POP
#include <trajopt/problem_description.hpp>
#include <trajopt_common/config.hpp>
#include <trajopt_common/logging.hpp>
#include "trajopt_test_utils.hpp"

using namespace trajopt;
using namespace tesseract_environment;
Expand All @@ -66,9 +65,9 @@ TEST(CartPositionOptimizationTrajoptSCO, cart_position_optimization_trajopt_sco)
}

// 1) Load Robot
tesseract_common::fs::path urdf_file(std::string(TRAJOPT_DIR) + "/test/data/arm_around_table.urdf");
tesseract_common::fs::path srdf_file(std::string(TRAJOPT_DIR) + "/test/data/pr2.srdf");
ResourceLocator::Ptr locator = std::make_shared<TrajOptSupportResourceLocator>();
tesseract_common::fs::path urdf_file(std::string(TRAJOPT_DATA_DIR) + "/arm_around_table.urdf");
tesseract_common::fs::path srdf_file(std::string(TRAJOPT_DATA_DIR) + "/pr2.srdf");
ResourceLocator::Ptr locator = std::make_shared<tesseract_common::GeneralResourceLocator>();
auto env = std::make_shared<Environment>();
env->init(urdf_file, srdf_file, locator);

Expand Down
12 changes: 6 additions & 6 deletions trajopt/test/cast_cost_attached_unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ TRAJOPT_IGNORE_WARNINGS_POP
#include <trajopt/plot_callback.hpp>
#include <trajopt/problem_description.hpp>
#include <trajopt_sco/optimizers.hpp>
#include "trajopt_test_utils.hpp"
#include <trajopt_common/config.hpp>
#include <trajopt_common/eigen_conversions.hpp>
#include <trajopt_common/logging.hpp>
#include <trajopt_common/stl_to_string.hpp>
#include "trajopt_test_utils.hpp"

using namespace trajopt;
using namespace std;
Expand All @@ -42,10 +42,10 @@ class CastAttachedTest : public testing::TestWithParam<const char*>

void SetUp() override
{
tesseract_common::fs::path urdf_file(std::string(TRAJOPT_DIR) + "/test/data/boxbot.urdf");
tesseract_common::fs::path srdf_file(std::string(TRAJOPT_DIR) + "/test/data/boxbot.srdf");
tesseract_common::fs::path urdf_file(std::string(TRAJOPT_DATA_DIR) + "/boxbot.urdf");
tesseract_common::fs::path srdf_file(std::string(TRAJOPT_DATA_DIR) + "/boxbot.srdf");

ResourceLocator::Ptr locator = std::make_shared<TrajOptSupportResourceLocator>();
ResourceLocator::Ptr locator = std::make_shared<tesseract_common::GeneralResourceLocator>();
EXPECT_TRUE(env_->init(urdf_file, srdf_file, locator));

gLogLevel = trajopt_common::LevelError;
Expand Down Expand Up @@ -105,7 +105,7 @@ void runLinkWithGeomTest(const Environment::Ptr& env, const Visualization::Ptr&

env->applyCommand(std::make_shared<ChangeLinkCollisionEnabledCommand>("box_attached", true));

Json::Value root = readJsonFile(std::string(TRAJOPT_DIR) + "/test/data/config/box_cast_test.json");
Json::Value root = readJsonFile(std::string(TRAJOPT_DATA_DIR) + "/config/box_cast_test.json");

std::unordered_map<std::string, double> ipos;
ipos["boxbot_x_joint"] = -1.9;
Expand Down Expand Up @@ -165,7 +165,7 @@ void runLinkWithoutGeomTest(const Environment::Ptr& env, const Visualization::Pt

env->applyCommand(std::make_shared<ChangeLinkCollisionEnabledCommand>("box_attached2", true));

Json::Value root = readJsonFile(std::string(TRAJOPT_DIR) + "/test/data/config/box_cast_test.json");
Json::Value root = readJsonFile(std::string(TRAJOPT_DATA_DIR) + "/config/box_cast_test.json");

std::unordered_map<std::string, double> ipos;
ipos["boxbot_x_joint"] = -1.9;
Expand Down
10 changes: 5 additions & 5 deletions trajopt/test/cast_cost_octomap_unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ TRAJOPT_IGNORE_WARNINGS_POP
#include <trajopt/plot_callback.hpp>
#include <trajopt/problem_description.hpp>
#include <trajopt_sco/optimizers.hpp>
#include "trajopt_test_utils.hpp"
#include <trajopt_common/config.hpp>
#include <trajopt_common/eigen_conversions.hpp>
#include <trajopt_common/logging.hpp>
#include <trajopt_common/stl_to_string.hpp>
#include "trajopt_test_utils.hpp"

using namespace trajopt;
using namespace std;
Expand All @@ -44,10 +44,10 @@ class CastOctomapTest : public testing::TestWithParam<const char*>

void SetUp() override
{
tesseract_common::fs::path urdf_file(std::string(TRAJOPT_DIR) + "/test/data/boxbot_world.urdf");
tesseract_common::fs::path srdf_file(std::string(TRAJOPT_DIR) + "/test/data/boxbot.srdf");
tesseract_common::fs::path urdf_file(std::string(TRAJOPT_DATA_DIR) + "/boxbot_world.urdf");
tesseract_common::fs::path srdf_file(std::string(TRAJOPT_DATA_DIR) + "/boxbot.srdf");

ResourceLocator::Ptr locator = std::make_shared<TrajOptSupportResourceLocator>();
ResourceLocator::Ptr locator = std::make_shared<tesseract_common::GeneralResourceLocator>();
EXPECT_TRUE(env_->init(urdf_file, srdf_file, locator));

gLogLevel = trajopt_common::LevelError;
Expand Down Expand Up @@ -98,7 +98,7 @@ void runTest(const Environment::Ptr& env, const Visualization::Ptr& plotter, boo
{
CONSOLE_BRIDGE_logDebug("CastOctomapTest, boxes");

Json::Value root = readJsonFile(std::string(TRAJOPT_DIR) + "/test/data/config/box_cast_test.json");
Json::Value root = readJsonFile(std::string(TRAJOPT_DATA_DIR) + "/config/box_cast_test.json");

std::unordered_map<std::string, double> ipos;
ipos["boxbot_x_joint"] = -1.9;
Expand Down
10 changes: 5 additions & 5 deletions trajopt/test/cast_cost_unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ TRAJOPT_IGNORE_WARNINGS_POP
#include <trajopt/plot_callback.hpp>
#include <trajopt/problem_description.hpp>
#include <trajopt_sco/optimizers.hpp>
#include <trajopt_test_utils.hpp>
#include <trajopt_common/config.hpp>
#include <trajopt_common/eigen_conversions.hpp>
#include <trajopt_common/logging.hpp>
#include <trajopt_common/stl_to_string.hpp>
#include "trajopt_test_utils.hpp"

using namespace trajopt;
using namespace std;
Expand All @@ -39,10 +39,10 @@ class CastTest : public testing::TestWithParam<const char*>

void SetUp() override
{
boost::filesystem::path urdf_file(std::string(TRAJOPT_DIR) + "/test/data/boxbot.urdf");
boost::filesystem::path srdf_file(std::string(TRAJOPT_DIR) + "/test/data/boxbot.srdf");
boost::filesystem::path urdf_file(std::string(TRAJOPT_DATA_DIR) + "/boxbot.urdf");
boost::filesystem::path srdf_file(std::string(TRAJOPT_DATA_DIR) + "/boxbot.srdf");

ResourceLocator::Ptr locator = std::make_shared<TrajOptSupportResourceLocator>();
ResourceLocator::Ptr locator = std::make_shared<tesseract_common::GeneralResourceLocator>();
EXPECT_TRUE(env_->init(urdf_file, srdf_file, locator));

gLogLevel = trajopt_common::LevelError;
Expand All @@ -56,7 +56,7 @@ void runTest(const Environment::Ptr& env, const Visualization::Ptr& plotter, boo
{
CONSOLE_BRIDGE_logDebug("CastTest, boxes");

Json::Value root = readJsonFile(std::string(TRAJOPT_DIR) + "/test/data/config/box_cast_test.json");
Json::Value root = readJsonFile(std::string(TRAJOPT_DATA_DIR) + "/config/box_cast_test.json");

std::unordered_map<std::string, double> ipos;
ipos["boxbot_x_joint"] = -1.9;
Expand Down
10 changes: 5 additions & 5 deletions trajopt/test/cast_cost_world_unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ TRAJOPT_IGNORE_WARNINGS_POP
#include <trajopt/plot_callback.hpp>
#include <trajopt/problem_description.hpp>
#include <trajopt_sco/optimizers.hpp>
#include "trajopt_test_utils.hpp"
#include <trajopt_common/config.hpp>
#include <trajopt_common/eigen_conversions.hpp>
#include <trajopt_common/logging.hpp>
#include <trajopt_common/stl_to_string.hpp>
#include "trajopt_test_utils.hpp"

using namespace trajopt;
using namespace std;
Expand All @@ -40,10 +40,10 @@ class CastWorldTest : public testing::TestWithParam<const char*>

void SetUp() override
{
tesseract_common::fs::path urdf_file(std::string(TRAJOPT_DIR) + "/test/data/boxbot_world.urdf");
tesseract_common::fs::path srdf_file(std::string(TRAJOPT_DIR) + "/test/data/boxbot.srdf");
tesseract_common::fs::path urdf_file(std::string(TRAJOPT_DATA_DIR) + "/boxbot_world.urdf");
tesseract_common::fs::path srdf_file(std::string(TRAJOPT_DATA_DIR) + "/boxbot.srdf");

ResourceLocator::Ptr locator = std::make_shared<TrajOptSupportResourceLocator>();
ResourceLocator::Ptr locator = std::make_shared<tesseract_common::GeneralResourceLocator>();
EXPECT_TRUE(env_->init(urdf_file, srdf_file, locator));

gLogLevel = trajopt_common::LevelError;
Expand Down Expand Up @@ -81,7 +81,7 @@ void runTest(const Environment::Ptr& env, const Visualization::Ptr& plotter, boo
{
CONSOLE_BRIDGE_logDebug("CastWorldTest, boxes");

Json::Value root = readJsonFile(std::string(TRAJOPT_DIR) + "/test/data/config/box_cast_test.json");
Json::Value root = readJsonFile(std::string(TRAJOPT_DATA_DIR) + "/config/box_cast_test.json");

std::unordered_map<std::string, double> ipos;
ipos["boxbot_x_joint"] = -1.9;
Expand Down
11 changes: 5 additions & 6 deletions trajopt/test/interface_unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ TRAJOPT_IGNORE_WARNINGS_POP
#include <trajopt/plot_callback.hpp>
#include <trajopt/problem_description.hpp>
#include <trajopt_sco/optimizers.hpp>
#include <trajopt_test_utils.hpp>
#include <trajopt_common/logging.hpp>

using namespace trajopt;
Expand All @@ -33,10 +32,10 @@ class InterfaceTest : public testing::TestWithParam<const char*>
Visualization::Ptr plotter_; /**< Trajopt Plotter */
void SetUp() override
{
tesseract_common::fs::path urdf_file(std::string(TRAJOPT_DIR) + "/test/data/arm_around_table.urdf");
tesseract_common::fs::path srdf_file(std::string(TRAJOPT_DIR) + "/test/data/pr2.srdf");
tesseract_common::fs::path urdf_file(std::string(TRAJOPT_DATA_DIR) + "/arm_around_table.urdf");
tesseract_common::fs::path srdf_file(std::string(TRAJOPT_DATA_DIR) + "/pr2.srdf");

ResourceLocator::Ptr locator = std::make_shared<TrajOptSupportResourceLocator>();
ResourceLocator::Ptr locator = std::make_shared<tesseract_common::GeneralResourceLocator>();
EXPECT_TRUE(env_->init(urdf_file, srdf_file, locator));

gLogLevel = trajopt_common::LevelError;
Expand Down Expand Up @@ -161,7 +160,7 @@ TEST_F(InterfaceTest, initial_trajectory_json_interface)
// These must match the json file or the test will fail!!
const int steps = 10;

Json::Value root = readJsonFile(std::string(TRAJOPT_DIR) + "/test/data/config/arm_around_table.json");
Json::Value root = readJsonFile(std::string(TRAJOPT_DATA_DIR) + "/config/arm_around_table.json");

std::unordered_map<std::string, double> ipos;
ipos["torso_lift_joint"] = 0;
Expand Down Expand Up @@ -196,7 +195,7 @@ TEST_F(InterfaceTest, initial_trajectory_time_json_interface)
const int steps = 10;
const double dt = 0.12341234;

Json::Value root = readJsonFile(std::string(TRAJOPT_DIR) + "/test/data/config/arm_around_table.json");
Json::Value root = readJsonFile(std::string(TRAJOPT_DATA_DIR) + "/config/arm_around_table.json");

std::unordered_map<std::string, double> ipos;
ipos["torso_lift_joint"] = 0;
Expand Down
7 changes: 3 additions & 4 deletions trajopt/test/joint_costs_unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ TRAJOPT_IGNORE_WARNINGS_POP
#include <trajopt/plot_callback.hpp>
#include <trajopt/problem_description.hpp>
#include <trajopt_sco/optimizers.hpp>
#include <trajopt_test_utils.hpp>
#include <trajopt_common/clock.hpp>
#include <trajopt_common/config.hpp>
#include <trajopt_common/eigen_conversions.hpp>
Expand All @@ -38,10 +37,10 @@ class CostsTest : public testing::TestWithParam<const char*>

void SetUp() override
{
tesseract_common::fs::path urdf_file(std::string(TRAJOPT_DIR) + "/test/data/arm_around_table.urdf");
tesseract_common::fs::path srdf_file(std::string(TRAJOPT_DIR) + "/test/data/pr2.srdf");
tesseract_common::fs::path urdf_file(std::string(TRAJOPT_DATA_DIR) + "/arm_around_table.urdf");
tesseract_common::fs::path srdf_file(std::string(TRAJOPT_DATA_DIR) + "/pr2.srdf");

ResourceLocator::Ptr locator = std::make_shared<TrajOptSupportResourceLocator>();
ResourceLocator::Ptr locator = std::make_shared<tesseract_common::GeneralResourceLocator>();
EXPECT_TRUE(env_->init(urdf_file, srdf_file, locator));

gLogLevel = trajopt_common::LevelError;
Expand Down
Loading

0 comments on commit 5589fa8

Please sign in to comment.