Skip to content
Merged
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
7 changes: 5 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -188,13 +188,16 @@ function(generate_package_libraries INIT_DIRECTORY AllLibs)
endif()

# Link all necessary libraries
target_link_libraries(${LIB_NAME} PUBLIC ArchitectureUtilities)
target_link_libraries(${LIB_NAME} PRIVATE ModuleIdGenerator)
target_link_libraries(${LIB_NAME} PUBLIC cMsgCInterface)
target_link_libraries(${LIB_NAME} PRIVATE ${PYTHON3_MODULE})
target_link_libraries(${LIB_NAME} PRIVATE Eigen3::Eigen3)
if(${PARENT_DIR_NAME} STREQUAL "mujocoDynamics")
target_link_libraries(${LIB_NAME} PUBLIC dynamicsLib)
# dynamicsLib already has ArchitectureUtilities and cMsgCInterface
# publicly linked, so no need to add them (again) for mujocoDynamics
else()
target_link_libraries(${LIB_NAME} PUBLIC ArchitectureUtilities)
target_link_libraries(${LIB_NAME} PUBLIC cMsgCInterface)
endif()

# define build location, IDE generation specifications
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class MJQPosStateData : public StateData
*
* @return A unique pointer to the cloned `StateData` object.
*/
virtual std::unique_ptr<StateData> clone() const;
virtual std::unique_ptr<StateData> clone() const override;

/**
* @brief Configures the state data with the given MuJoCo model.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ class MJScene : public DynamicObject
* @param error The error message.
*/
template <typename T = std::invalid_argument>
void logAndThrow (const std::string& error);
[[noreturn]] void logAndThrow (const std::string& error);

public:
static const int FWD_KINEMATICS_PRIORITY = 10000; ///< Priority for default forward kinematics model.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ void MJSite::writeFwdKinematicsMessage(mjModel* model, mjData* data, uint64_t Cu
mrpd = rot;

double res[6];
mj_objectVelocity(model, data, mjOBJ_SITE, this->getId(), res, 0);
mj_objectVelocity(model, data, mjOBJ_SITE, static_cast<int>(this->getId()), res, 0);

// TODO: Double check this is right
std::copy_n(res, 3, payload.omega_BN_B);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ using mjVFSDeleter = mjDeleter<mjVFS, mj_deleteVFS>;

/** Loggs an error message and then throws an error. */
template <typename T = std::invalid_argument>
inline void logAndThrow (const std::string& error, BSKLogger* logger = nullptr)
[[noreturn]] inline void logAndThrow (const std::string& error, BSKLogger* logger = nullptr)
{
if (logger) {
logger->bskLog(BSK_ERROR, error.c_str());
Expand Down