Skip to content

fixed moveit_joy test - #170

Merged
v4hn merged 1 commit into
moveit:kinetic-develfrom
rhaschke:kinetic-devel
Aug 26, 2016
Merged

v4hn merged 1 commit into
moveit:kinetic-develfrom
rhaschke:kinetic-devel

Conversation

@rhaschke

Copy link
Copy Markdown
Contributor

Follow up for #149. Again, ROS buildfarm failed on the joystick test...

This (hopefully) fixes the issue finally.
Actually there seems to be a bug in rostest as well: Because our python bindings segfaulted due to an empty robot model (https://github.com/ros-planning/moveit_commander/issues/32), rostest didn't finish correctly, but reported the test as SUCCEEDED, while the unittest log file was empty. This made only ROS buildfarm to fail, which do some extra analysis of the log files...

also gracefully handles an invalid robot model in python interface
instead of segfaulting (this was actually the reason for the joy test to fail)
{
robot_model_ = planning_interface::getSharedRobotModel(robot_description);
if (!robot_model_)
throw std::runtime_error("RobotInterfacePython: invalid robot model");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason I can't find the definition of planning_interface::getSharedRobotModel, but does it not return more meaningful info when the model file is "invalid"? I'm afraid how useful for the developers to debug to be told that the model is invalid. If it only returns null obj when robot model is invalid, then this error handling message is perfectly fine (and we probably want to improve getSharedRobotModel to throw exception with more info).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getSharedRobotModel only returns a pointer to a cached robot model.
There is another PR (#46) pending to avoid invalid models in first place. Indeed, we might want to add some error message there.

@rhaschke

Copy link
Copy Markdown
Contributor Author

Could somebody please consider this for merging in order to fix Travis and build farm tests?
With this PR, travis correctly succeeded on the joystick test (i.e. with 1 successful test).

@v4hn

v4hn commented Aug 26, 2016

Copy link
Copy Markdown
Contributor

+1 This also addresses #47 by throwing an exception instead of the segfault.

@v4hn
v4hn merged commit 85f6a96 into moveit:kinetic-devel Aug 26, 2016
v4hn pushed a commit that referenced this pull request Aug 26, 2016
also gracefully handles an invalid robot model in python interface
instead of segfaulting (this was actually the reason for the joy test to fail)
v4hn pushed a commit that referenced this pull request Aug 26, 2016
also gracefully handles an invalid robot model in python interface
instead of segfaulting (this was actually the reason for the joy test to fail)
@v4hn

v4hn commented Aug 26, 2016

Copy link
Copy Markdown
Contributor

picked to i/j

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

Successfully merging this pull request may close these issues.

3 participants