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

Graphically print current robot joint states with joint limits #1358

Conversation

Projects
None yet
3 participants
@davetcoleman
Copy link
Member

commented Feb 20, 2019

A trivial feature I made a long time ago, with unit tests

image

@davetcoleman davetcoleman requested a review from mlautman Feb 20, 2019

@davetcoleman davetcoleman requested a review from rhaschke Feb 23, 2019

@rhaschke
Copy link
Collaborator

left a comment

Some minor remarks only.
By the way, the code doesn't handle unbounded joints yet, does it?

Show resolved Hide resolved moveit_core/robot_state/test/robot_state_test.cpp Outdated
Show resolved Hide resolved moveit_core/robot_state/test/robot_state_test.cpp Outdated
Show resolved Hide resolved moveit_core/robot_state/test/robot_state_test.cpp Outdated
{
moveit::core::RobotState state(robot_model_);
const robot_model::JointModelGroup* joint_model_group = robot_model_->getJointModelGroup("base_from_base_to_e");
EXPECT_TRUE(joint_model_group);

This comment has been minimized.

Copy link
@rhaschke

rhaschke Feb 23, 2019

Collaborator
Suggested change
EXPECT_TRUE(joint_model_group);
ASSERT_TRUE(joint_model_group);
@@ -2174,6 +2175,59 @@ void RobotState::printStatePositions(std::ostream& out) const
out << nm[i] << "=" << position_[i] << std::endl;
}

bool RobotState::printStatePositionsWithJointLimits(const moveit::core::JointModelGroup* jmg, std::ostream& out) const

This comment has been minimized.

Copy link
@rhaschke

rhaschke Feb 23, 2019

Collaborator

What's the motivation behind the return value in this print function?
The function is always returning true. Please change to returning void.

This comment has been minimized.

Copy link
@davetcoleman

davetcoleman Feb 24, 2019

Author Member

it used to return false when there were multi-variable joints, but i removed that. fixed per you

@davetcoleman davetcoleman force-pushed the davetcoleman:melodic-print-joint-limits branch from fc3a657 to 8938af8 Feb 24, 2019

void RobotState::printStatePositionsWithJointLimits(const moveit::core::JointModelGroup* jmg, std::ostream& out) const
{
// TODO(davetcoleman): support joints with multiple variables / multiple DOFs such as floating joints
// TODO(davetcoleman): support unbounded joints

This comment has been minimized.

Copy link
@rhaschke

rhaschke Feb 25, 2019

Collaborator

That's an interesting solution to reply to change requests 😉

This comment has been minimized.

Copy link
@davetcoleman

davetcoleman Feb 25, 2019

Author Member

i think its a very good solution myself! don't build it until you need it...

@davetcoleman davetcoleman merged commit 6a9f0ea into ros-planning:melodic-devel Feb 25, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@davetcoleman davetcoleman deleted the davetcoleman:melodic-print-joint-limits branch Feb 25, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.