Skip to content

Split resources into multiple packages#36

Merged
rhaschke merged 11 commits intomasterfrom
pr-split-resources
Aug 12, 2020
Merged

Split resources into multiple packages#36
rhaschke merged 11 commits intomasterfrom
pr-split-resources

Conversation

@v4hn
Copy link
Copy Markdown
Contributor

@v4hn v4hn commented Jul 6, 2020

This has been overdue for a long time.

The change allows to launch the robots via roslaunch moveit_resources_... demo.launch. This was not possible before because the package contained multiple demo.launch files.
Additionally, all moveit_config's can now be proper packages, which can be opened in the setup assistant.

When porting the moveit_config packages for fanuc and panda, I noticed they were quite outdated, so instead of porting fanuc forward, I regenerated a whole new fanuc configuration.
For panda, I pulled the latest version from the separate repository, adjusting things so that we still use our own panda_description.

This needs a coordinated pull-request in moveit to adapt all paths to the new locations.

This change was named a requirement for moveit/moveit#1893 because Pilz needs to add another robot to the resources for their tests.

@v4hn
Copy link
Copy Markdown
Contributor Author

v4hn commented Jul 6, 2020

This is a huge change and I'm somewhat unsure with how to merge it soon without too much trouble...

Any help to migrate the main repository to the new file locations is very welcome.

@tylerjw
Copy link
Copy Markdown
Member

tylerjw commented Jul 6, 2020

Thank you for doing this. I can help with building a PR to migrate the main repo to point to these new locations. One thing this will be nice for is (as you updated the panda configs) the subframes test should work. Right now it only works with panda_moveit_config which will be a problem when we go to release into Noetic.

@v4hn
Copy link
Copy Markdown
Contributor Author

v4hn commented Jul 6, 2020 via email

- package *_description folders
@v4hn v4hn force-pushed the pr-split-resources branch from 140129f to ec4d175 Compare July 7, 2020 07:38
@v4hn
Copy link
Copy Markdown
Contributor Author

v4hn commented Jul 7, 2020

I can't even build my workspace today because of some new catkin_tools bug...

It turned out that the catkin_tools bug was that in case of cyclic dependencies in the workspace it would add a comma-separated string of all involved packages to a list of Package objects.
I pushed a commit to remove the cyclic dependencies (which were introduced by the setup assistant) and the workspace builds now.

Of course, all interfaces still need to be adjusted in the main repo.

@v4hn
Copy link
Copy Markdown
Contributor Author

v4hn commented Jul 7, 2020

Together with moveit/moveit_tutorials#507 and moveit/moveit#2199 I get at least a workspace that builds successfully, but of course most tests are broken.

@rhaschke
Copy link
Copy Markdown
Contributor

rhaschke commented Jul 7, 2020

It turned out that the catkin_tools bug was that in case of cyclic dependencies in the workspace it would add a comma-separated string of all involved packages to a list of Package objects.

I filed a PR to fix this: catkin/catkin_tools#617

I pushed a commit to remove the cyclic dependencies (which were introduced by the setup assistant).

For me, the workspace (comprising moveit and moveit_resources only), doesn't build when reverting ec4d175. I don't see yet, why the separation of moveit_resources into individual packages should introduce a circular dependency. Where do you see the circular dependency introduced by MSA? Where did you fixed it?

@v4hn
Copy link
Copy Markdown
Contributor Author

v4hn commented Jul 7, 2020

For me, the workspace (comprising moveit and moveit_resources only), doesn't build when reverting ec4d175. I don't see yet, why the separation of moveit_resources into individual packages should introduce a circular dependency. Where do you see the circular dependency introduced by MSA? Where did you fixed it?

This commit was what I was talking about. The assistant generates package.xml files with dependency loops.
From my perspective, committing these additional dependencies is the way to go for moveit_resources.

@jschleicher
Copy link
Copy Markdown
Contributor

Thank you very much, for pushing this split!
Implements #34

@v4hn
Copy link
Copy Markdown
Contributor Author

v4hn commented Jul 7, 2020

I suggest to extend the comment slightly

I pushed a new commit which also enables the moveit-independent dependencies again.

@rhaschke rhaschke force-pushed the pr-split-resources branch from b9cb150 to 3b48212 Compare July 7, 2020 23:37
@jschleicher
Copy link
Copy Markdown
Contributor

I just tried to run the tests, but got (probably unrelated?) two failures in MeshFilterTest:
https://gist.github.com/jschleicher/7df2fedd617eec10f88f25ec5ef6aafd
Any ideas?

Otherwise the commits look very well!

@rhaschke
Copy link
Copy Markdown
Contributor

@jschleicher, I guess you already figured out that the mesh filter test is fixed via #2180. I'm going to close and reopen to re-trigger Travis against the latest git HEAD.

@rhaschke rhaschke closed this Jul 25, 2020
@rhaschke rhaschke reopened this Jul 25, 2020
@jschleicher
Copy link
Copy Markdown
Contributor

@rhaschke #2180 seems like rounding difference, while I got large differences.

The difference between filtered_depth[idx] and gt_depth[idx] is 3.599998950958252, which exceeds 1e-6, where
filtered_depth[idx] evaluates to 3.599998950958252,
gt_depth[idx] evaluates to 0

I'll still try to run the tests with #2180 merged.

Copy link
Copy Markdown
Member

@tylerjw tylerjw left a comment

Choose a reason for hiding this comment

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

I tested this using these commands locall on 18.04 with Melodic:

# clone repos
TEST_WS=~/tmp/ws_moveit_resources_refactor_test/
mkdir -p ${TEST_WS}/src/
cd ${TEST_WS}/src
git clone git@github.com:ros-planning/moveit_resources.git -b pr-split-resources
git clone git@github.com:ros-planning/moveit.git -b pr-master-rework-resources
git clone https://github.com/ros-planning/moveit_msgs.git
git clone https://github.com/ros-planning/geometric_shapes.git
git clone https://github.com/PickNikRobotics/rviz_visual_tools
git clone https://github.com/ros-planning/moveit_visual_tools.git
git clone https://github.com/ros-planning/panda_moveit_config.git

# build
cd $TEST_WS
catkin config --no-install --extend /opt/ros/melodic --cmake-args -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS_RELEASE="-O3"
catkin build

# filter function from moveit_ci
filter_out() {
  local PATTERN="$1"; shift
  echo "$*" | tr ' ;,' '\n' | grep -Fvxf <(echo "$PATTERN" | tr ' ;,' '\n') | tr '\n' ' '
}

# configure what tests we are testing (also from moveit_ci)
all_pkgs=$(catkin_topological_order ${TEST_WS}/src --only-names)
source_pkgs=$(catkin_topological_order ${TEST_WS}/src/moveit --only-names)
blacklist_pkgs=$(filter_out "$source_pkgs" "$all_pkgs")
catkin config --append-args --blacklist $blacklist_pkgs

# build and run tests
catkin build --make-args tests
catkin build --summarize --catkin-make-args run_tests

# results
catkin_test_results

The result of this is I see the same test failure with the meshes tests but everything else seems to be passing.

@martiniil
Copy link
Copy Markdown

Link to issue: moveit/moveit/issues/2228

Copy link
Copy Markdown
Contributor

@jschleicher jschleicher left a comment

Choose a reason for hiding this comment

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

Thanks @v4hn for your work! Approving.

@v4hn v4hn mentioned this pull request Aug 5, 2020
@SansoneG
Copy link
Copy Markdown

SansoneG commented Aug 7, 2020

@v4hn Is there anything still holding this PR back from getting merged?

v4hn and others added 8 commits August 12, 2020 08:46
this turns it into an actual moveit_config editable by the setup assistant.

As I regenerated the whole package, I removed most references to the ROS-Industrial source.
pulled from upstream repo and updated the paths as well as some minor changes
required to use our version of panda_description.
Provide the same interface as fanuc
@rhaschke rhaschke force-pushed the pr-split-resources branch from 3b48212 to a0b09d1 Compare August 12, 2020 09:49
@rhaschke
Copy link
Copy Markdown
Contributor

- Add preprocessed panda.srdf required by robot_model_test_utils
- Fix location of panda.urdf
@rhaschke
Copy link
Copy Markdown
Contributor

Currently, this is blocked by moveit/moveit_ci#117, which will fix the broken Indigo build.

@rhaschke rhaschke force-pushed the pr-split-resources branch from ee078e1 to aa48929 Compare August 12, 2020 20:13
because packages require cmake > 3.1
@rhaschke rhaschke force-pushed the pr-split-resources branch from aa48929 to bf880dc Compare August 12, 2020 20:25
@rhaschke rhaschke merged commit 2d26746 into master Aug 12, 2020
@rhaschke rhaschke deleted the pr-split-resources branch August 12, 2020 21:28
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.

6 participants