Skip to content

CHOMP planner and CollisionDistanceField - #155

Merged
davetcoleman merged 21 commits into
moveit:indigo-develfrom
ksatyaki:indigo-devel
Sep 22, 2016
Merged

davetcoleman merged 21 commits into
moveit:indigo-develfrom
ksatyaki:indigo-devel

Conversation

@ksatyaki

@ksatyaki ksatyaki commented Aug 25, 2016 •

Copy link
Copy Markdown
Contributor

Pull request to add chomp and collision_distance_field from ksatyaki/moveit_planners and ksatyaki/collision_distance_field.

Brief list of changes made (mostly by @jrgnicho and myself)

  • collision_distance_field has been catkinized and ported to the latest moveit API.
  • Constructor Version 1 in CollisionRobotDistanceField has been fixed.
  • CHOMP motion planner and the moveit interface have been updated to work with the latest moveit API.
  • Compiles fine. Planning with chomp reports "dirty link transforms". Use chomp_test to test chomp.

@jrgnicho

Copy link
Copy Markdown
Contributor

The "dirty links transform" warning indicates that the pose of the link hasn't been updated accordingly. Calling the Link::update() method should resolve this.

@ksatyaki

ksatyaki commented Aug 25, 2016 •

Copy link
Copy Markdown
Contributor Author

@jrgnicho I don't know what exactly is causing the segfault. Backtrace reports that it is happening in RevoluteJointModel::isContinuous() method. It's funny.

Update

I have now fixed the segfault. But now I get
"Variable 'link_6-tool0' is not known to model 'test_kr210'"

Hence, planning fails.

Also, where exactly is the RobotState::update() method supposed to be called?

size_x_ = other.size_x_;
size_y_ = other.size_y_;
size_z_ = other.size_z_;
ROS_INFO_STREAM("Version 4");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

is this necessary/relevant?

@davetcoleman

Copy link
Copy Markdown
Member

@ksatyaki I realize most my comments don't apply to code you wrote, but to a previous author. Still, I think it would be nice to cleanup the code base a bit. I'd even advice running clang-format in moveit_experimental and chomp to auto fix all style mistakes

I'm glad to see you mention a test robot. But can we change your test to use one from moveit_resources?

Do you mind documenting how to use STOMP? It can be a short overview in a new page on moveit_tutorials just based on your personal notes. This will allow me to test your changes at runtime rather than just reviewing this PR.

Is there a way to easily see a visualization of the body sphere markers? I see it mentioned throughout the code

Eventually we want to move the distance field out of experimental, but we'll first want to have multiple users testing and using this code before it can "graduate".

@ksatyaki

ksatyaki commented Aug 26, 2016 •

Copy link
Copy Markdown
Contributor Author

@ksatyaki I realize most my comments don't apply to code you wrote, but to a previous author. Still, I think it would be nice to cleanup the code base a bit. I'd even advice running clang-format in moveit_experimental and chomp to auto fix all style mistakes

I have pushed changes after running clang-format.

I'm glad to see you mention a test robot. But can we change your test to use one from moveit_resources?

Sorry, I am not aware of this test robot... Maybe it was someone before me. I will try to learn more about this.

Do you mind documenting how to use STOMP? It can be a short overview in a new page on moveit_tutorials just based on your personal notes. This will allow me to test your changes at runtime rather than just reviewing this PR.

You mean CHOMP? I can create a page for this.

Is there a way to easily see a visualization of the body sphere markers? I see it mentioned throughout the code.

I can check this out. I am actually relatively new to moveit.

@davetcoleman

Copy link
Copy Markdown
Member

Thanks for the quick response!

For the test robot, use: https://github.com/ros-planning/moveit_resources. If the two included robots aren't enough, you can add a new robot to that repo

CHOMP, yes :)

I can check this out. I am actually relatively new to moveit.

Don't worry about it then, thanks for the effort you're putting into this

@jrgnicho I'm hoping you can help me test this PR

@ksatyaki

ksatyaki commented Aug 29, 2016 •

Copy link
Copy Markdown
Contributor Author

I get the error,

[ERROR] [1472464558.330767910]: Variable 'joint_6-tool0' is not known to model 'fanuc'
Exception thrown.
[ERROR] [1472464558.331403186]: Exception caught: 'Variable 'joint_6-tool0' is not known to model 'fanuc''

When using the fanuc test robot from the moveit_resources package.

I am predicting that this is possibly because it is adding a fixed joint to the trajectory. This could be due to the API differences. One of the things I noticed was that the old didn't have the types RevoluteJointModel, PrismaticJointModel, etc.

Update

Ok, I had to change all the getJointModels() to getActiveJointModels() because in the OLD API getJointModels() returned only the active joint models. I think I'm pretty close to getting CHOMP to work.

@ksatyaki

Copy link
Copy Markdown
Contributor Author

Now the build is passing. :)

@jrgnicho

Copy link
Copy Markdown
Contributor

@ksatyaki thank you. @davetcoleman I'm OK with merging this PR.

@ksatyaki

Copy link
Copy Markdown
Contributor Author

@davetcoleman

Copy link
Copy Markdown
Member

I'm not a fan of simply disabling the tests - do you think you could instead look into fixing the tests so that future maintenance of this code is easier? Or will you have time in the future?

@ksatyaki

ksatyaki commented Sep 12, 2016 via email

Copy link
Copy Markdown
Contributor Author

@ksatyaki

Copy link
Copy Markdown
Contributor Author

The tests are failing, is that normal or is something missing?

kstate.getLinkState("base_link")->updateGivenGlobalLinkTransform(Eigen::Affine3d::Identity());
kstate.getLinkState("base_bellow_link")->updateGivenGlobalLinkTransform(offset);
kstate.updateStateWithLinkAt("base_link", Eigen::Affine3d::Identity());
kstate.updateStateWithLinkAt("base_bellow_link", offset);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

bad indentation

@davetcoleman

Copy link
Copy Markdown
Member

The moveit-indigo tests currently all pass, except for changes in this PR. Looking at the Travis logs the following test fails:

DistanceFieldCollisionDetectionTester.AttachedBodyTester

*** Error in `/root/ws_moveit/devel/.private/moveit_experimental/lib/moveit_experimental/test_collision_distance_field': free(): invalid pointer: 0x00007fff0856c130 ***

Aborted (core dumped)

Cannot find results, writing failure results to '/root/ws_moveit/build/moveit_experimental/test_results/moveit_experimental/MISSING-gtest-test_collision_distance_field.xml'

I would run these tests locally on you computer (see Running Tests Locally) and see if you can fix the invalid pointer

@ksatyaki

ksatyaki commented Sep 21, 2016 •

Copy link
Copy Markdown
Contributor Author

How do I run these tests within gdb? The segfault is super hard to track otherwise.

One of the 6 tests fails. It's the AttachedBodyTester that fails. I don't know if I can help fix this though. :(

Let me know if you can...

@davetcoleman

Copy link
Copy Markdown
Member

@ksatyaki if you tried but couldn't get the test to pass, you can just disable it for now and we move to get this PR in so it isn't further delayed. I know this is a big PR for someone else's code and I appreciate your effort. We just need Travis to pass now.

@ksatyaki

Copy link
Copy Markdown
Contributor Author

Okay, it was only one assertion that failed. So I just commented that one out. All other tests pass. So I have committed that. Thanks.

@davetcoleman

Copy link
Copy Markdown
Member

Great! When I merge I will squash this into one commit, unless you want to do that yourself. Afterwards can you also open PRs for the Jade and Kinetic branches, since I'm suspecting there will need to be small fixes there also?

@davetcoleman
davetcoleman merged commit 32315dd into moveit:indigo-devel Sep 22, 2016
@davetcoleman davetcoleman mentioned this pull request Sep 22, 2016
2 tasks done
davetcoleman pushed a commit to davetcoleman/moveit that referenced this pull request Sep 25, 2016
* Copy collision_distance_field package
* Resurrect chomp
* remove some old Makefiles and manifests
* Correct various errors
* Code formatting, author, description, version, etc
* Add definitions for c++11. Nested templates problem.
* Add name to planner plugin.
* Change getJointModels to getActiveJointModels.
* Call robot_state::RobotState::update in setRobotStateFromPoint.
* Create README.md
* Improve package.xml, CMake config and other changes suggested by jrgnicho.
* Remove some commented code, add scaling factors to computeTimeStampes
* Add install targets in moveit_experimental and chomp
* Add install target for headers in chomp pkgs.
* Remove unnecessary debugging ROS_INFO.
* Port collision_distance_field test to indigo.
* Remove one assertion that makes collision_distance_field test to fail.
davetcoleman pushed a commit to davetcoleman/moveit that referenced this pull request Sep 25, 2016
* Copy collision_distance_field package
* Resurrect chomp
* remove some old Makefiles and manifests
* Correct various errors
* Code formatting, author, description, version, etc
* Add definitions for c++11. Nested templates problem.
* Add name to planner plugin.
* Change getJointModels to getActiveJointModels.
* Call robot_state::RobotState::update in setRobotStateFromPoint.
* Create README.md
* Improve package.xml, CMake config and other changes suggested by jrgnicho.
* Remove some commented code, add scaling factors to computeTimeStampes
* Add install targets in moveit_experimental and chomp
* Add install target for headers in chomp pkgs.
* Remove unnecessary debugging ROS_INFO.
* Port collision_distance_field test to indigo.
* Remove one assertion that makes collision_distance_field test to fail.
@davetcoleman

Copy link
Copy Markdown
Member

I've just opened the PRs for J/K

davetcoleman added a commit that referenced this pull request Sep 25, 2016
* Copy collision_distance_field package
* Resurrect chomp
* remove some old Makefiles and manifests
* Correct various errors
* Code formatting, author, description, version, etc
* Add definitions for c++11. Nested templates problem.
* Add name to planner plugin.
* Change getJointModels to getActiveJointModels.
* Call robot_state::RobotState::update in setRobotStateFromPoint.
* Create README.md
* Improve package.xml, CMake config and other changes suggested by jrgnicho.
* Remove some commented code, add scaling factors to computeTimeStampes
* Add install targets in moveit_experimental and chomp
* Add install target for headers in chomp pkgs.
* Remove unnecessary debugging ROS_INFO.
* Port collision_distance_field test to indigo.
* Remove one assertion that makes collision_distance_field test to fail.
davetcoleman pushed a commit that referenced this pull request Sep 26, 2016
* Copy collision_distance_field package
* Resurrect chomp
* remove some old Makefiles and manifests
* Correct various errors
* Code formatting, author, description, version, etc
* Add definitions for c++11. Nested templates problem.
* Add name to planner plugin.
* Change getJointModels to getActiveJointModels.
* Call robot_state::RobotState::update in setRobotStateFromPoint.
* Create README.md
* Improve package.xml, CMake config and other changes suggested by jrgnicho.
* Remove some commented code, add scaling factors to computeTimeStampes
* Add install targets in moveit_experimental and chomp
* Add install target for headers in chomp pkgs.
* Remove unnecessary debugging ROS_INFO.
* Port collision_distance_field test to indigo.
* Remove one assertion that makes collision_distance_field test to fail.
davetcoleman pushed a commit to davetcoleman/moveit that referenced this pull request Sep 27, 2016
* Copy collision_distance_field package
* Resurrect chomp
* remove some old Makefiles and manifests
* Correct various errors
* Code formatting, author, description, version, etc
* Add definitions for c++11. Nested templates problem.
* Add name to planner plugin.
* Change getJointModels to getActiveJointModels.
* Call robot_state::RobotState::update in setRobotStateFromPoint.
* Create README.md
* Improve package.xml, CMake config and other changes suggested by jrgnicho.
* Remove some commented code, add scaling factors to computeTimeStampes
* Add install targets in moveit_experimental and chomp
* Add install target for headers in chomp pkgs.
* Remove unnecessary debugging ROS_INFO.
* Port collision_distance_field test to indigo.
* Remove one assertion that makes collision_distance_field test to fail.
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