Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace Error -> Info when necessary #4

Open
wants to merge 1 commit into
base: noetic
Choose a base branch
from
Open
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
Replace Error -> Info when necessary
This is related to #3. Please check if the changes make sense and merge the request. Particularly not sure about `robot_manipulator_bullet.cpp:380`...
  • Loading branch information
Pouya-moh authored Nov 16, 2020
commit 672d28adf4c7e83ab6e6b0c9c1eab47e151379aa
24 changes: 12 additions & 12 deletions src/robots/robot_manipulator_bullet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ bool RobotManipulatorBullet::configure()
// Configure Collision
int collisionFilterGroup_kuka = 0x10;
int collisionFilterMask_kuka = 0x1;
PRELOG(Error, this->tc) << "Setting collision for bullet link " << i << RTT::endlog();
PRELOG(Info, this->tc) << "Setting collision for bullet link " << i << RTT::endlog();
sim->setCollisionFilterGroupMask(this->robot_id, i, collisionFilterGroup_kuka, collisionFilterMask_kuka);
}

Expand All @@ -377,7 +377,7 @@ bool RobotManipulatorBullet::configure()
// Select joints accordingly!
for (unsigned int i = 0; i < this->kdl_chain.segments.size(); i++)
{
PRELOG(Error, this->tc) << i << " KDL Segmentname " << this->kdl_chain.segments[i].getName() << ", Jointname " << this->kdl_chain.segments[i].getJoint().getName() << RTT::endlog();
PRELOG(Info, this->tc) << i << " KDL Segmentname " << this->kdl_chain.segments[i].getName() << ", Jointname " << this->kdl_chain.segments[i].getJoint().getName() << RTT::endlog();
// Ignore fixed joints
if (this->kdl_chain.segments[i].getJoint().getType() == KDL::Joint::None)
{
Expand All @@ -394,39 +394,39 @@ bool RobotManipulatorBullet::configure()
// Candidate Joints with types
if (jointInfo.m_jointType == eFixedType)
{
PRELOG(Error, this->tc) << "[CANDIDATE] (eFixedType) joint Motorname " << jointInfo.m_jointName << " at index " << jointInfo.m_jointIndex << RTT::endlog();
PRELOG(Info, this->tc) << "[CANDIDATE] (eFixedType) joint Motorname " << jointInfo.m_jointName << " at index " << jointInfo.m_jointIndex << RTT::endlog();
}
else if (jointInfo.m_jointType == eRevoluteType)
{
PRELOG(Error, this->tc) << "[CANDIDATE] (eRevoluteType) joint Motorname " << jointInfo.m_jointName << " at index " << jointInfo.m_jointIndex << RTT::endlog();
PRELOG(Info, this->tc) << "[CANDIDATE] (eRevoluteType) joint Motorname " << jointInfo.m_jointName << " at index " << jointInfo.m_jointIndex << RTT::endlog();
}
else if (jointInfo.m_jointType == ePrismaticType)
{
PRELOG(Error, this->tc) << "[CANDIDATE] (ePrismaticType) joint Motorname " << jointInfo.m_jointName << " at index " << jointInfo.m_jointIndex << RTT::endlog();
PRELOG(Info, this->tc) << "[CANDIDATE] (ePrismaticType) joint Motorname " << jointInfo.m_jointName << " at index " << jointInfo.m_jointIndex << RTT::endlog();
}
else if (jointInfo.m_jointType == eSphericalType)
{
PRELOG(Error, this->tc) << "[CANDIDATE] (eSphericalType) joint Motorname " << jointInfo.m_jointName << " at index " << jointInfo.m_jointIndex << RTT::endlog();
PRELOG(Info, this->tc) << "[CANDIDATE] (eSphericalType) joint Motorname " << jointInfo.m_jointName << " at index " << jointInfo.m_jointIndex << RTT::endlog();
}
else if (jointInfo.m_jointType == ePlanarType)
{
PRELOG(Error, this->tc) << "[CANDIDATE] (ePlanarType) joint Motorname " << jointInfo.m_jointName << " at index " << jointInfo.m_jointIndex << RTT::endlog();
PRELOG(Info, this->tc) << "[CANDIDATE] (ePlanarType) joint Motorname " << jointInfo.m_jointName << " at index " << jointInfo.m_jointIndex << RTT::endlog();
}
else if (jointInfo.m_jointType == ePoint2PointType)
{
PRELOG(Error, this->tc) << "[CANDIDATE] (ePoint2PointType) joint Motorname " << jointInfo.m_jointName << " at index " << jointInfo.m_jointIndex << RTT::endlog();
PRELOG(Info, this->tc) << "[CANDIDATE] (ePoint2PointType) joint Motorname " << jointInfo.m_jointName << " at index " << jointInfo.m_jointIndex << RTT::endlog();
}
else if (jointInfo.m_jointType == eGearType)
{
PRELOG(Error, this->tc) << "[CANDIDATE] (eGearType) joint Motorname " << jointInfo.m_jointName << " at index " << jointInfo.m_jointIndex << RTT::endlog();
PRELOG(Info, this->tc) << "[CANDIDATE] (eGearType) joint Motorname " << jointInfo.m_jointName << " at index " << jointInfo.m_jointIndex << RTT::endlog();
}
// Ignore fixed joints
if ((jointInfo.m_jointIndex > -1) && (jointInfo.m_jointType != eFixedType))
{
std::string _bullet_name = jointInfo.m_jointName;
if (this->kdl_chain.segments[i].getJoint().getName().compare(_bullet_name) == 0)
{
PRELOG(Error, this->tc) << "[KDL+BULLET] Found joint Motorname " << jointInfo.m_jointName << " at index " << jointInfo.m_jointIndex << RTT::endlog();
PRELOG(Info, this->tc) << "[KDL+BULLET] Found joint Motorname " << jointInfo.m_jointName << " at index " << jointInfo.m_jointIndex << RTT::endlog();
map_joint_names_2_indices[jointInfo.m_jointName] = jointInfo.m_jointIndex;
vec_joint_indices.push_back(jointInfo.m_jointIndex);
_found_bullet_joint_for_kdl_joint = true;
Expand Down Expand Up @@ -551,7 +551,7 @@ bool RobotManipulatorBullet::configure()
this->M[i * this->num_motor_joints + j] = 0.0;
}
// sim->resetJointState(this->robot_id, this->joint_indices[i], 0.0);
PRELOG(Error, this->tc) << "Resetting joint [" << i << "] = " << this->joint_indices[i] << RTT::endlog();
PRELOG(Info, this->tc) << "Resetting joint [" << i << "] = " << this->joint_indices[i] << RTT::endlog();
}

// Initialize the global control parameters (This could perhaps evolve into a memory leak, if the arrays are not freed when stopped!)
Expand Down Expand Up @@ -600,4 +600,4 @@ bool RobotManipulatorBullet::setBasePosition(const double &x, const double &y, c
{
return false;
}
}
}