Skip to content

Commit

Permalink
Merge pull request #213 from pariterre/master
Browse files Browse the repository at this point in the history
Bumped to 1.6.0
  • Loading branch information
pariterre authored Jul 8, 2021
2 parents a0cca19 + 6aa1829 commit 4116dbb
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.0")
cmake_policy(SET CMP0042 NEW)
endif()

project(biorbd VERSION 1.5.5)
project(biorbd VERSION 1.6.0)
set (CMAKE_CXX_STANDARD 11)
set (BIORBD_NAME ${PROJECT_NAME})

Expand Down
2 changes: 1 addition & 1 deletion include/Muscles/Muscles.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class BIORBD_API Muscles
/// \param name The name of the muscle group
/// \return The group ID (returns -1 if not found)
///
int getGroupId(
int getMuscleGroupId(
const biorbd::utils::String &name) const;


Expand Down
6 changes: 3 additions & 3 deletions src/ModelReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ void biorbd::Reader::readModelFile(
if (!property_tag.tolower().compare("musclegroup")){
// Dynamically find the parent number
file.read(muscleGroup);
idxGroup = model->getGroupId(muscleGroup);
idxGroup = model->getMuscleGroupId(muscleGroup);
// If parent_int is still equal to zero, no name has concurred
biorbd::utils::Error::check(idxGroup!=-1, "Could not find muscle group");
}
Expand Down Expand Up @@ -902,7 +902,7 @@ void biorbd::Reader::readModelFile(
else if (!property_tag.tolower().compare("position"))
readVector3d(file, variable, position);
}
iMuscleGroup = model->getGroupId(musclegroup);
iMuscleGroup = model->getMuscleGroupId(musclegroup);
biorbd::utils::Error::check(iMuscleGroup!=-1, "No muscle group was provided!");
iMuscle = model->muscleGroup(static_cast<unsigned int>(iMuscleGroup)).muscleID(muscle);
biorbd::utils::Error::check(iMuscle!=-1, "No muscle was provided!");
Expand Down Expand Up @@ -961,7 +961,7 @@ void biorbd::Reader::readModelFile(
file.read(length, variable);
}
biorbd::utils::Error::check(parent != "", "Parent was not defined");
iMuscleGroup = model->getGroupId(musclegroup);
iMuscleGroup = model->getMuscleGroupId(musclegroup);
biorbd::utils::Error::check(iMuscleGroup!=-1, "No muscle group was provided!");
iMuscle = model->muscleGroup(static_cast<unsigned int>(iMuscleGroup)).muscleID(muscle);
biorbd::utils::Error::check(iMuscle!=-1, "No muscle was provided!");
Expand Down
6 changes: 3 additions & 3 deletions src/Muscles/Muscles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ void biorbd::muscles::Muscles::addMuscleGroup(
const biorbd::utils::String &insertionName)
{
if (m_mus->size() > 0)
biorbd::utils::Error::check(getGroupId(name)==-1, "Muscle group already defined");
biorbd::utils::Error::check(getMuscleGroupId(name)==-1, "Muscle group already defined");

m_mus->push_back(biorbd::muscles::MuscleGroup(name, originName, insertionName));
}

int biorbd::muscles::Muscles::getGroupId(const biorbd::utils::String &name) const{
int biorbd::muscles::Muscles::getMuscleGroupId(const biorbd::utils::String &name) const{
for (unsigned int i=0; i<m_mus->size(); ++i)
if (!name.compare((*m_mus)[i].name()))
return static_cast<int>(i);
Expand Down Expand Up @@ -119,7 +119,7 @@ const biorbd::muscles::MuscleGroup &biorbd::muscles::Muscles::muscleGroup(unsign
return (*m_mus)[idx];
}
const biorbd::muscles::MuscleGroup &biorbd::muscles::Muscles::muscleGroup(const biorbd::utils::String& name) const{
int idx = getGroupId(name);
int idx = getMuscleGroupId(name);
biorbd::utils::Error::check(idx!=-1, "Group name could not be found");
return muscleGroup(static_cast<unsigned int>(idx));
}
Expand Down
3 changes: 2 additions & 1 deletion src/RigidBody/Contacts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ std::vector<biorbd::utils::Vector3d> biorbd::rigidbody::Contacts::constraintsInG
// On each control, apply the rotation and save the position
for (unsigned int i=0; i<size(); ++i){
tp.push_back(RigidBodyDynamics::CalcBodyToBaseCoordinates(
model, Q, body[i], point[i], updateKin));
model, Q, contactConstraints[i]->getBodyIds()[0],
contactConstraints[i]->getBodyFrames()[0].r, updateKin));
#ifndef BIORBD_USE_CASADI_MATH
updateKin = false;
#endif
Expand Down

0 comments on commit 4116dbb

Please sign in to comment.