ipab-slmc / exotica Goto Github PK
View Code? Open in Web Editor NEWExtensible Optimization Framework
Home Page: https://ipab-slmc.github.io/exotica
License: BSD 3-Clause "New" or "Revised" License
Extensible Optimization Framework
Home Page: https://ipab-slmc.github.io/exotica
License: BSD 3-Clause "New" or "Revised" License
Use initialization classes instead of multitude of init functions.
Use cmake to generate these classes in a similar way the ROS messages are generated.
Use wrappers to enable initialization from python, xml, matlab, JSON, ...
I have have looked into cleaning up the exotica repo to remove big files and to remove our current working code (DRM, drake interface, OMPL customization for whole body planning, ...).
Strictly speaking, current code should only contain current files and their history. I would like to then open source the clean code but also keep working on the clean code.
There are the following options for cleaning up the code:
Licensing has similar-ish issue because git history contains code without any licenses. This is especially troublesome because the licences should be included in every source file. According to GNU (paraphrased on a forum):
The lack of license and copyright information basically means:
you are not allowed to do anything with the code, well, except for
looking at it if its on some public hosting site.
I'm leaning towards option 1 for the licensing and also option 1 for cleaning up the repo, with the addition of removing accidentally/incorrectly committed files (there is about 10 of them).
@yimingyanged @iamwolf @mauricefallon any suggestions?
Redefine error checking based on SUCCESS/FAILURE values and the ok() utility function with exceptions.
Use try/catch mechanism If the return value should be converted to something useful that doesn't halt the execution, e.g. solver failed >> report error code.
There should still be an option to print coloured messages with line numbers when exception gets thrown.
Either use ros pluginlib or find a non-ros alternative (maybe boost?)
<Urdf>
node underneath <Kinematica>
specified the rosparam on which the URDF was. These are still in all initialisation files, but unused.robot_description
is hard-coded in the Scene.cpp
initialisers./exotica/robot_description
Hence,
a) would we like to reactivate use of the <Urdf>
tag - or perhaps another tag or directly in a server parameter (where we now have packages and urdf file names inside packages)
b) would we like to delete all instances of the <Urdf>
tag remnants and switch to something else?
It calls different scenes so returned results are different, cf:
Code:
bool is_valid;
is_valid = prob_->getScene()->getCollisionScene()->isStateValid(q);
std::cout << "Direct update without self check: " << is_valid << std::endl;
is_valid = prob_->getScene()->getCollisionScene()->isStateValid(q, true);
std::cout << "Direct update with self check: " << is_valid << std::endl;
prob_->getScene()->getCollisionScene()->update(q);
is_valid = prob_->getScene()->getCollisionScene()->isStateValid();
std::cout << "Two-step update without self check: " << is_valid << std::endl;
prob_->getScene()->getCollisionScene()->update(q);
is_valid = prob_->getScene()->getCollisionScene()->isStateValid(true);
std::cout << "Two-step update with self check: " << is_valid << std::endl;
prob_->getScene()->getCollisionScene()->update(q);
is_valid = prob_->getScene()->getCollisionScene()->isStateValid(true, 0.01);
std::cout << "Two-step update with self check and 1cm dist: " << is_valid << std::endl;
Result: (1 = valid, 0 = in collision)
Direct update without self check: 0
Direct update with self check: 0
Two-step update without self check: 1
Two-step update with self check: 1
Two-step update with self check and 1cm dist: 1
I can't find a way to pass the parameters in the OMPLImplementationInitializer from the XML - e.g. the Timeout (it's not a solver, but the implementation of a solver). Overall, it may make sense to move these parameters to the OMPLsolverInitializer?
Replace std::mapstd::string,exotica::Scene_ptr with just exotica::Scene_ptr.
This variable and corresponding getters/setters appear in a lot of depending source files - refactor accordingly.
The kinematic scene works with a group of joints. The remaining joints have to be set somehow.
Server holds a shared_ptrros::NodeHandle instead of just the handle
Currently broken and deactivated after #59
Use Lapack's dpotrf
and dpotri
for matrix inversion (see AICO implementation).
The kinematic solver currently outputs Eigen vectors and matrices (for eff. poses and Jacobians respectively). The solver does use KDL internally and the task maps can easily use the KDL as input (KDL::Frame
and KDL::Jacobian
). This would make the kinematic solver simpler and the operations in task map more transparent (e.g. dealing with frames instead of indexing into matrices).
The task map will have to convert the output into a Eigen::Vector/Matrix in the end but this will make the operation explicit (unlike doing it implicitly in the kinematic solver).
The IK solver has been accumulating a lot of code.
The implementation should only be a couple of lines long.
Unused code should be removed. Useful code should be simplified. Variables and methods have to named more appropriately.
As discussed
Anything apart from updating the collision scene with planning scene messages as in exotica_json
and using binary collision checking (bar the inconsistency issues laid out in #39) is currently broken. Issues among others:
There are a ton of fixes regarding computing distances including signed distances in the current head and I consider it worth using the new FCL version.
Of particular note:
KinematicTree
and FCL
directly.SamplingProblem
Running list of current issues with the Exotica Python wrapper (WIP):
-DPYBIND11_PYTHON_VERSION=3
, however, the libraries are not correctly picked up. I suspect this to be due to the non-standard why in which pybind/cmake/pybind.cmake
is doing the python lookuppybind_add_module
should not use custom commands but the CMake native versions of creating folders and copying files; they also prevent system-specific issuesAlso, I would like to suggest to rename exotica_py
to pyexotica
.
This will replace kinematica.
EParam
handling.The CMake macro logic for the initializers doesn't work with catkin tools if configured to not use an install directory as the files are generated in the devel and not the source tree whereas ${catkin_INCLUDE_DIRS}
will return the source tree path. Generating into the source tree is not a good CMake option either.
Questions thus are how to handle non-install configured workspaces?
[The issue arises by just building exotica - when building the examples it will fail as it cannot find the generated {something}Initializer.h file]
Error handling, e.g. catch if a link does not exist and give helpful warnings/messages. (Longer standing issue to track issues as they pop up)
map.at(
throw a cryptic error - hereAs discussed, after #125 gets merged the currently existing getDistance(object_name, object_name)
function won't work anymore. Furthermore, the collision objects are now named link_name_collision_number-of-shape
which is hard to query, better would be a map so that we can use e.g. lwr_arm_7_link, shelf
again
Thus, follow-ups on #125:
Symptom: problem.update wrongly updates the floating-base when not part of the state
Here's how to reproduce this:
The cause for this is that the BaseType
of the Scene
is incorrectly defined by the BaseType
of the KinematicTree
and then gets passed to CollisionScene
.
Solution: The Scene
/CollisionScene
needs to define their own BaseType
based on the planning group used on instantiation.
As currently, the reduction of the OMPL safety margin is only carried out for the goal state (and there's a bug in that which I am currently fixing) - during the sampling itself the original margin is used which leads to failures in cluttered scenarios.
We probably should consider removing the damping of the safety margin altogether and let people specify it per problem via the Margin initializer parameter.
E.g. Google
As discussed via WhatsApp yesterday, we need a way to pass ROS messages through the Python wrapper to Python-wrapped functions. We are currently investigating the use of serialization/deserialization of messages through buffers, however, they currently segfault at the conversion on the C++ side. Additionally, StringIO
isn't available in Python3 anymore: http://python-future.org/compatible_idioms.html#stringio
Build on #28
Wrap the initializer classes.
Keep other wrapper code minimal.
Use Boost::Python.
The inputs/outputs/parameters for task maps and task definitions are currently allocated by the solver (see here).
This makes the code hard to read and easy to introduce difficult to track memory access issues.
Each class should hold its own data or get it passed as an argument in a function.
To remove this feature (which was mistakenly added in the past):
registerPhi
, registerJacobian
, ...The joint group used for planning is currently defined in the initializer of the Scene.
The same information is already specified in the SRDF though.
Using the SRDF set of joints would make the initializer shorter and put the joint group in one unique place (the SRDF). This will also make it easier to use the MoveIt features more directly, e.g. setting the joint state, joint state indexing, joint limits, setting the unspecified joints (robot state), ...
Using several Maps in one problem, e.g. CoM+EffFrame works fine. As soon as more than one EffFrame is part of a problem, memory corruption occurs - perhaps due to the changing size from the rotational part?
and link names, e.g. for use in explicit collision checking
testing_pkg/include/Exotica
is capitalized. This is inconsistent with the rest of the packages.
Problems are currently tightly bound to solvers (AICOproblem, IKproblem, ...).
Problems should be independent of solvers. The code is already separated and moved into the core library where the problems will live. A proper naming should be decided. We need a discussion about problem types, how to categorize them and how to give them meaningful names.
The only action in code is to then rename the existing problems based on this discussion.
There are three ways to initialize EXOTica classes in the old code:
initDerived()
for base classes.reinitialise()
for specific problems.initialiseManual
for Scene.These are now deprecated in favour of the new initialization. All references to old initialization should be removed.
Switch from boost::shared_ptr
to std::shared_ptr
testing_pkg/include/Exotica
- is non-functional and should be updated.testing_pkg/include/Kinematica
- the package has been removed, so should be the test.testing_pkg/include/Exotica_old
- this is no longer relevant.Implement FK caching.
MotionSolver::Solve
takes the start state q0
as an argument at the moment.
PlanningProblem
.After implementing #46, the problem can hold everything necessary for handling a task map within its scope. The task definition is then redundant. The precision parameter (rho) can moved directly into the problem together with any time parametrization and other specifics.
Action: remove task definition class and move some of its functionality into the problems (where appropriate).
The number of controlled joints can be obtained using:
Scene::getNumJoints()
or
UnconstrainedEndPoseProblem::N
UnconstrainedTimeIndexedProblem::N
The result is the same. Consolidate the calling convention!
Write an interface for printing messages (info, warning, error, highlight,...).
Implement modules to display these messages in different environments (ROS, Python, Matlab, LCM).
Create a similar interface for plotting a visualization (e.g. display mesh, plot pose, ...).
The Scene's PlanningScene
joint state (controlled and "uncontrolled") are only updated via problem.update(q)
. Updating the model state via setModelState()
or setModelStateMap()
does not update the planning scene states.
The catkin wrapper should either be renamed to pybind11_catkin
to avoid clashes and use external project to checkout the source, or upstream the catkin related changes.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.