Skip to content
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

porting examples from tesseract_planning #51

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

jf---
Copy link

@jf--- jf--- commented Sep 22, 2023

Hi,

I'd like to contribute by porting the examples in the tesseract_planning repo to python.
I've started with

So far I can't get the solver to converge, for glass_upright_example.py I get the following:


[WARN] convex solver failed! set TRAJOPT_LOG_THRESH=DEBUG to see solver output. saving model to /tmp/fail.lp and IIS to /tmp/fail.ilp
ERROR in LDL_factor: Error in KKT matrix LDL factorization when computing the nonzero elements. The problem seems to be non-convex
ERROR in osqp_setup: KKT matrix factorization.
The problem seems to be non-convex.
OSQP Setup failed with error: Could not initialize OSQP: error 5
[WARN] convex solver failed! set TRAJOPT_LOG_THRESH=DEBUG to see solver output. saving model to /tmp/fail.lp and IIS to /tmp/fail.ilp
[ERROR] The convex solver failed you one too many times.

glass_upright_example.py doesn't give any warnings, but isn't successful in planning the path.
(I still need to rule out that parsing puzzle_bent.csv isn't the issue)

I've noticed that in the windows version of tesseract_python the QPOASES, QSQP solvers are available, but not GUROBI and BPMPD, while the latter IIRC is the default solver. Is it possible that this may be the culprint?

@jf--- jf--- changed the title Jf/port examples porting examples from tesseract_planning Sep 22, 2023
@Levi-Armstrong
Copy link
Contributor

I am excited to see this.

@Levi-Armstrong
Copy link
Contributor

The solver could be the issue. I am not sure if those examples via c++ use the default or explicitly set one.

@johnwason
Copy link
Contributor

Thanks @jf--- . What platform are you running and how did you install the Python package?

@jf---
Copy link
Author

jf--- commented Sep 22, 2023

@Levi-Armstrong thx, I'll keep chipping at it.

I am not sure if those examples via c++ use the default or explicitly set one

I don't see any solver set explicitly

The version I've installed doesn't come with IFOPT, so likely the default is set by TrajOptMotionPlannerTask in the YAML config file

What platform are you running and how did you install the Python package?

Windows 11 ( ARM, under protest, seriously, I'm working on a mac m1 ARM processor emulating, running windows in a VM, with windows emulating x86 🤦🏼 ), via pip, Version: 0.2.0.post1. The test suite runs just fine.

@jf---
Copy link
Author

jf--- commented Sep 22, 2023

Sorry, I forgot to point out that pip install compas is required for now.
I missed or overlooked Vector3d class for cross and unitize methods

@johnwason
Copy link
Contributor

@jf--- I think it should be possible to compile everything for native arm64 mac os. We haven’t made mac os or arm support a priority.

@jf---
Copy link
Author

jf--- commented Sep 23, 2023

@johnwason it's very tempting to have proper mac support but I'm not particularly strong on cmake / c++. But with all the libs in conda it's probably doable. For now I'm probably one of very very few that has this need, so I'll endure VM's for now. I'd be happy to sponsor a Mac port.

FWIW, as I'm learning I'm trying to get to a pythonic interface on top of tesseract-python. Will report back when the code can withstand some daylight. For now having fun porting.

@johnwason
Copy link
Contributor

Also take a look at https://github.com/rpiRobotics/rpi_general_robotics_toolbox_py/blob/master/src/general_robotics_toolbox/tesseract.py

@rjoomen
Copy link

rjoomen commented Sep 25, 2023

I believe the default solver is OSQP nowadays.

@jf---
Copy link
Author

jf--- commented Sep 25, 2023

Thanks for the pointer @johnwason thx for the heads-up @rjoomen

@dave992
Copy link

dave992 commented Oct 13, 2023

I am at the moment looking at porting the basic_cartesian_example.cpp as an exercise to better understand setting up an environment and use (Python) Tesseract. I should be able to make a contribution to this PR or the repo by adding this when most of the structure is there.

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.

5 participants