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

Remove isValidState utility #325

Open
marip8 opened this issue Jun 5, 2023 · 1 comment
Open

Remove isValidState utility #325

marip8 opened this issue Jun 5, 2023 · 1 comment

Comments

@marip8
Copy link
Contributor

marip8 commented Jun 5, 2023

/**
* @brief Check if the robot is in a valid state
* @param The robot kinematic representation
* @param joint_values The joint values of the robot
* @param limits The robot joint limits
* @return True if within limits otherwise false
*/
template <typename FloatType>
bool isValidState(const tesseract_kinematics::ForwardKinematics::ConstPtr& robot_kin,
const Eigen::Ref<const Eigen::Matrix<FloatType, Eigen::Dynamic, 1>>& joint_values,
const Eigen::Matrix<FloatType, Eigen::Dynamic, 2>& limits)
{
if (!tesseract_common::isWithinPositionLimits(joint_values, limits))
return false;
Eigen::Vector2i sign_correction = Eigen::Vector2i::Ones();
sign_correction(0) = -1;
RobotConfig robot_config =
getRobotConfig<FloatType>(joint_values.tail(robot_kin->numJoints()), robot_kin, sign_correction);
return !(robot_config != RobotConfig::FUT && robot_config != RobotConfig::NUT);
}

I was just perusing through some of the planner utility functions and I found the one above that seems very tied to a specific robot configuration. I think we should remove this function as it could be confusing to users

@Levi-Armstrong
Copy link
Contributor

I don't think it should be removed but would be good to update the documentation so it is clear when to use this utility method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants