Skip to content

create new urdf model if none is available - #46

Closed
v4hn wants to merge 2 commits into
moveit:indigo-develfrom
v4hn:create-urdf-if-empty
Closed

v4hn wants to merge 2 commits into
moveit:indigo-develfrom
v4hn:create-urdf-if-empty

Conversation

@v4hn

@v4hn v4hn commented Aug 15, 2016

Copy link
Copy Markdown
Contributor

This requires
ros-visualization/rviz#1039 and
#45 .

This should be "the fix" @davetcoleman mentioned in #43 .
However, because this depends on a bugfix in rviz and we can't influence their release cycle,
this is probably not the road to take to unblock the overdue jade release.

This can be merged once the rviz fix is merged and released.

@davetcoleman

davetcoleman commented Aug 15, 2016 •

Copy link
Copy Markdown
Member

Travis failed:

/opt/ros/indigo/share/rostest/cmake/../../../bin/rostest --pkgdir=/root/ros/ws_moveit/src/moveit/moveit_ros/visualization --package=moveit_ros_visualization --results-filename test_moveit_joy.xml --results-base-dir /root/ros/ws_moveit/build/moveit_ros_visualization/test_results /root/ros/ws_moveit/src/moveit/moveit_ros/visualization/test/moveit_joy.test 
... logging to /root/.ros/log/rostest-b20a438c182a-20054.log
[ROSUNIT] Outputting test results to /root/ros/ws_moveit/build/moveit_ros_visualization/test_results/moveit_ros_visualization/rostest-test_moveit_joy.xml
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::lock_error> >'
  what():  boost: mutex lock failed in pthread_mutex_lock: Invalid argument
testmoveit_joy ... ok

i just re-triggered the build because the error doesn't make sense.

@v4hn
v4hn force-pushed the create-urdf-if-empty branch 2 times, most recently from 4b93730 to db64833 Compare August 15, 2016 23:02
@v4hn

v4hn commented Aug 16, 2016

Copy link
Copy Markdown
Contributor Author

I updated the request to work with latest head, but the obscure error persists.
I have no idea how that bug could be triggered here. It might be related to #45 that has to be merged before this one either way. I'll rebase the request once the other one is merged.
Everyone is welcome to have a look, as I don't have time for this atm.

@davetcoleman

Copy link
Copy Markdown
Member

#45 is merged, could you rebase this?

@v4hn
v4hn force-pushed the create-urdf-if-empty branch 2 times, most recently from a23f2f2 to feb1c1f Compare August 16, 2016 18:40
@v4hn

v4hn commented Aug 16, 2016 •

Copy link
Copy Markdown
Contributor Author

The test still fails the assertion, but I can't reproduce this locally.
(although I didn't test it with rostest)

@davetcoleman

Copy link
Copy Markdown
Member

I locally copied this change into the kinetic branch and ran the tests and it also caused a failure to the moveit_joy test. Looking at it further, I believe its because the moveit_joy test doesn't load a SRDF/URDF and previously it didn't care but with this change it causes the python class MoveitJoy to segfault during initialization, somewhere near the parseSRDF function.

Essentially you've caused RobotModelLoader to have a stricter enforcement, which breaks a currently faulty test.

I'm not a python developer and don't use gtest with python, so perhaps @130s who originally made the test can improve the test.

@v4hn

v4hn commented Aug 17, 2016

Copy link
Copy Markdown
Contributor Author

Python code should never ever segfault, so it's not just a faulty test. :)

@rhaschke

rhaschke commented Aug 19, 2016 •

Copy link
Copy Markdown
Contributor

The error is not related to this PR, nor to the moveit_joy test. It's again an error induced by cleaning up static variables on program exit.
I noticed that with my integration tests too.

@rhaschke

rhaschke commented Aug 19, 2016 •

Copy link
Copy Markdown
Contributor

I tracked the bug down to a gcc issue: ros/ros_comm#870. No idea how to proceed.
I proposed a PR ros/ros_comm#871 upstream.

@davetcoleman

Copy link
Copy Markdown
Member

Should i create a PR to disable the faulty joy python test? Talking to @130s today, who created the simple test, he was in favor of this. I'd like to get this PR merged

@v4hn

v4hn commented Aug 24, 2016

Copy link
Copy Markdown
Contributor Author

On Tue, Aug 23, 2016 at 04:42:57PM -0700, Dave Coleman wrote:

Should i create a PR to disable the faulty joy python test?
Talking to @130s today, who created the simple test, he was in favor of this.

+1

@v4hn

v4hn commented Aug 24, 2016

Copy link
Copy Markdown
Contributor Author

On Wed, Aug 24, 2016 at 02:50:35AM -0700, Robert Haschke wrote:

Wait a second! I'm just looking in this issue again.

Too late #143 (comment)
The test is disabled for now. That doesn't mean though, that we
have to merge the request here right away...

@v4hn

v4hn commented Aug 25, 2016

Copy link
Copy Markdown
Contributor Author

We can't do that anyway, because we need ros-visualization/rviz#1039 to be released.
Also, I'm not sure we should release this into indigo at the moment. As this broke something rather far away in RViz, I'm not sure if there are other side-effects.

@rhaschke rhaschke mentioned this pull request Aug 26, 2016
const boost::shared_ptr<srdf::Model> &srdf = rdf_loader_->getSRDF() ? rdf_loader_->getSRDF() : boost::shared_ptr<srdf::Model>(new srdf::Model());
model_.reset(new robot_model::RobotModel(rdf_loader_->getURDF(), srdf));
}

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.

As pointed out in #170 (comment), there should be a warning message, if the model is empty.

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.

On Fri, Aug 26, 2016 at 01:24:57AM -0700, Robert Haschke wrote:

As pointed out in #170 (comment), there should be a warning message, if the model is empty.

This only indirectly relates to this request.
I've filed #173 to add the appropriate warning.

@v4hn
v4hn force-pushed the create-urdf-if-empty branch from feb1c1f to 1a78f75 Compare August 26, 2016 09:15
@rhaschke

Copy link
Copy Markdown
Contributor

Thinking about #46 (comment), I noticed that the rviz plugin skips a lot of actions if the robot model is invalid (which would have been the case before this PR):
if (!getRobotModel() ...) return;

With this PR, getRobotModel() should return an empty shared_ptr as well, if the robot model is defined but empty in order to preserve previous behaviour. Otherwise, indeed other issues might pop up due to this PR.

Considering this, will not pass an empty robot model to rviz for visualization and thus would make this PR independent of ros-visualization/rviz#1039.

@v4hn

v4hn commented Aug 26, 2016 •

Copy link
Copy Markdown
Contributor Author

You are right, it is a well-established interface that getRobotModel might return a null_ptr.
I'll close this request.

However, we still need to fix #47 .
Thus, the best way to do this becomes to add a number of if(!getRobotModel()) checks to the python wrapper.

@v4hn v4hn closed this Aug 26, 2016
AndyZe pushed a commit to AndyZe/moveit that referenced this pull request Mar 17, 2023
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