Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_INSTALL_L
endif()


find_package (Eigen3 3 REQUIRED NO_MODULE)
find_package (Eigen3 REQUIRED NO_MODULE)

add_library(libplaco SHARED
# Wrappers
Expand Down
12 changes: 9 additions & 3 deletions src/placo/kinematics/wheel_task.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
#include "placo/kinematics/wheel_task.h"
#include "placo/kinematics/kinematics_solver.h"

#if defined(EIGEN_VERSION_AT_LEAST) && EIGEN_VERSION_AT_LEAST(5, 0, 0)
#define PLACO_KINEMATICS_WHEEL_TASK_ALL Eigen::placeholders::all
#else
#define PLACO_KINEMATICS_WHEEL_TASK_ALL Eigen::all
#endif

namespace placo::kinematics
{
WheelTask::WheelTask(std::string joint, double radius, bool omniwheel)
Expand Down Expand Up @@ -39,8 +45,8 @@ void WheelTask::update()
// With an omniwheel, we remove the lateral sliding constraint (along contact y axis)
if (omniwheel)
{
Eigen::MatrixXd new_A = A({ 0, 2 }, Eigen::all);
Eigen::MatrixXd new_b = b({ 0, 2 }, Eigen::all);
Eigen::MatrixXd new_A = A({ 0, 2 }, PLACO_KINEMATICS_WHEEL_TASK_ALL);
Eigen::MatrixXd new_b = b({ 0, 2 }, PLACO_KINEMATICS_WHEEL_TASK_ALL);
A = new_A;
b = new_b;
}
Expand All @@ -55,4 +61,4 @@ std::string WheelTask::error_unit()
{
return "m";
}
} // namespace placo::kinematics
} // namespace placo::kinematics
9 changes: 8 additions & 1 deletion src/placo/tools/axises_mask.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
#include "placo/tools/axises_mask.h"
#include <stdexcept>


if defined(EIGEN_VERSION_AT_LEAST) && EIGEN_VERSION_AT_LEAST(5, 0, 0)
#define PLACO_TOOLS_AXISES_MASK_ALL Eigen::placeholders::all
#else
#define PLACO_TOOLS_AXISES_MASK_ALL Eigen::all
#endif

namespace placo::tools
{
AxisesMask::AxisesMask()
Expand Down Expand Up @@ -76,6 +83,6 @@ Eigen::MatrixXd AxisesMask::apply(Eigen::MatrixXd M)
M_masked = M;
}

return M_masked(indices, Eigen::all);
return M_masked(indices, PLACO_TOOLS_AXISES_MASK_ALL);
}
} // namespace placo::tools