-
Notifications
You must be signed in to change notification settings - Fork 948
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
ikfast improvements #1320
ikfast improvements #1320
Conversation
994e656
to
d402bed
Compare
Creating the ikfast plugins takes another 5-7min of time in Travis, which should be avoided to be done multiple times. I suggest to introduce a new variable |
2cb5c5b
to
f942d41
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really awesome contribution with the test coverage! And thanks @mlautman for making the bulk of these changes. A few small feedback items and then let's get this merged in finally.
moveit_kinematics/ikfast_kinematics_plugin/scripts/create_ikfast_moveit_plugin.sh
Outdated
Show resolved
Hide resolved
moveit_kinematics/ikfast_kinematics_plugin/scripts/create_ikfast_moveit_plugin.sh
Outdated
Show resolved
Hide resolved
moveit_kinematics/ikfast_kinematics_plugin/scripts/create_ikfast_moveit_plugin.sh
Outdated
Show resolved
Hide resolved
moveit_kinematics/ikfast_kinematics_plugin/scripts/create_ikfast_moveit_plugin.sh
Outdated
Show resolved
Hide resolved
moveit_kinematics/ikfast_kinematics_plugin/templates/CMakeLists.txt
Outdated
Show resolved
Hide resolved
moveit_kinematics/ikfast_kinematics_plugin/templates/ikfast61_moveit_plugin_template.cpp
Show resolved
Hide resolved
moveit_kinematics/ikfast_kinematics_plugin/templates/ikfast61_moveit_plugin_template.cpp
Show resolved
Hide resolved
I greatly appreciate Mike's initial contributions. But they are not the "bulk of these changes":
|
0eb988a
to
2792e6b
Compare
I'll defer to @mlautman for approval of this PR |
2792e6b
to
a114e83
Compare
Since you like disruptive changes @rhaschke I wonder if this ikfast mess should not be solved more generally. As I see it a ikfast plugin consists of two parts:
at the moment 1. is generated as well and not updated automatically. There is no clear reason for this. However it creates maintenance issues at ROS-I as they a) would need separate branches for kinetic/indigo and melodic because MoveIt! changed API. Also b) changes like this need updates and PRs in at least 10 repos at ros-i. The solution [1] and [2] by @gavanderhoorn is to basically drop ikfast for ros-i and switch to opw_kinematics (which I totally support and will adapt for us). So my idea would be to have
(Note: For me/us I will still prefer opw_kinematics and I'm not going to implement any of this as long as I don't find a robot model that is supported by ikfast but not opw_kinematics ...) |
@simonschmeisser Each ikfast plugin already creates an update script, which can be used to update the wrapper without touching the OpenRave code. I don't see the point in having an extra plugin/wrapper layer between the KinematicsBase plugin and OpenRave code. This will just move the API update issues to another layer. opw_kinematics seems to be interesting. Need to have a look. |
@rhaschke yes, but this layer would be here in the MoveIt! in a central place instead of repeated in 10+ downstream repos. And since the "openrave" API has been stable for quite some years the "issue" would actually vanish. |
I see, you think of a generic KinematicsBase-IKFast plugin (provided once by MoveIt), which then loads the actual OpenRave solver as a plugin. Hence, we would be free to change the API of KinematicsBase. |
It could either load it as plugin or just link it. See sketch below In the generic part in moveit: (can be updated any time)
and in the specific plugin (this will likely never need to be updated, just recompiled)
but no, sorry, I'm also not going to implement it, opw_kinematics ... ;) |
Using inheritance would be even simpler, indeed. Shouldn't be that difficult to implement. But I don't have cylces anymore. Really need to focus on my own work now... |
516c717
to
a114e83
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are great improvements! I am very excited for when this is merged :)
moveit_kinematics/ikfast_kinematics_plugin/scripts/auto_create_ikfast_moveit_plugin.sh
Show resolved
Hide resolved
moveit_kinematics/ikfast_kinematics_plugin/scripts/auto_create_ikfast_moveit_plugin.sh
Outdated
Show resolved
Hide resolved
} | ||
|
||
function parse_options { | ||
# set defaults (if not set in environment yet) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace tabs with spaces
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope. I like spaces because they allow users to adjust their indentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spaces are the moveit and ros and google code style, which exist to eliminate these needless discussions. From ROS:
Indent each block by 2 spaces. Never insert literal tab characters.
moveit_kinematics/ikfast_kinematics_plugin/scripts/auto_create_ikfast_moveit_plugin.sh
Outdated
Show resolved
Hide resolved
moveit_kinematics/ikfast_kinematics_plugin/scripts/auto_create_ikfast_moveit_plugin.sh
Show resolved
Hide resolved
moveit_kinematics/ikfast_kinematics_plugin/scripts/auto_create_ikfast_moveit_plugin.sh
Outdated
Show resolved
Hide resolved
moveit_kinematics/ikfast_kinematics_plugin/scripts/auto_create_ikfast_moveit_plugin.sh
Show resolved
Hide resolved
moveit_kinematics/ikfast_kinematics_plugin/scripts/create_ikfast_moveit_plugin.py
Outdated
Show resolved
Hide resolved
Generalize ikfast solver by allowing arbitrary base and tip links (different from the original ikfast chain) as long as those links are rigidly connected to the chain's base resp. tip.
- initialize() from RobotModel - rename active_ -> initialized_
... about unused variables, mismatching sign comparison, etc.
Split monolithic function update_package() into several smaller functions
So far, only roslib.packages.get_pkg_dir() was used from ROS to find package paths. Providing a stub for it, we can run the script also without a ROS context. In this case, however, we cannot modify the MoveIt config package.
Just noticed that these OpenRave cpps are ~ 4 MB in total! I don't think we want to add them to the source repository just for fast unit testing.
Maybe we can store them as a gist on https://gist.github.com/ or on some other external server and download them from there during Travis testing. |
9801a2b
to
2e44219
Compare
That's interesting. The M-10iA IKFast solver over at ros-industrial/fanuc (this one) is only 104 KB. |
4c33aef
to
98d1b13
Compare
gitlfs would solve the large file issue! |
11ff12e
to
6c26ed9
Compare
6c26ed9
to
3635a41
Compare
Adapt ikfast plugin to new KinematicsBase API. Unit testing for ikfast solvers of fanuc + panda.
This is a rebase of @mlautman's #1014 to Melodic
tf2
transition done in MelodicgetClosestSolution()
+harmonize()
The unittest utilizes a docker container for OpenRave (integrated with ROS Indigo) as suggested in moveit/moveit_tutorials#186 and moveit/moveit_tutorials#187. There were several options available to realize unit tests, none of them being optimal:
BEFORE_SCRIPT
would require to run docker within docker, which is not recommended.before_script
requires the URDFs frommoveit_resources
to be available,when the repo isn't yet cloned from
moveit.rosinstall
. Also, the Travis script runs w/o ROS context.I decided for the last option, explicitly cloning
moveit_resources
beforehand and having the creator scripts made ROS agnostic.When merging, please keep full history, i.e. create a merge commit.