Please visit [https://github.com/AIS-Bonn/TopiCo]
ais-bonn / opt_control Goto Github PK
View Code? Open in Web Editor NEWTime-optimal Trajectory Generation and Control
Time-optimal Trajectory Generation and Control
Please visit [https://github.com/AIS-Bonn/TopiCo]
This library is wonderful.
I've written a Python interface directly to your .a library for use in a Python program (no Matlab or ROS runtime dependencies). It works robustly with b_sync_W=true, but if I set b_sync_W=false I can occasionally find edge cases where I get an "Error: Could not find valid timed solution!"
The Matlab reference implementation does solve these same test cases correctly, so the error may very well be on my end. In the test cases I fail, one axis solution matches the Matlab solution and the other axis is invalid. I have a few questions I hope would point me in the right direction:
I see the mex file (matlab/opt_control_lib_mex.mexa64) had a bug fix 15 months ago, but the library (ROS/opt_control/lib/opt_control_lib.a) is much older than that. Is there any chance the library I'm using doesn't have the most up to date bug fixes?
Other than the printed error message itself, do any of the function's return values give error codes to help narrow down where the problem lies?
Do you have any plans to release the underlying Matlab code? If I could compile the library myself, I suspect it would be easier to find the discrepancy between the Matlab and C++/Python solutions.
Hi!
Thanks for the great package!
I am running into a problem though that I would like to ask you about.
I'm playing around with a python script (using the Matlab python engine) that uses a function modifying your example.m to calculate trajectories (see attached files).
When I run it on Windows (Windows 10, Matlab R2019b Update 3) it works properly, but when I use exactly the same file on Ubuntu 16.04 (and 18.04) I get the error posted in the header. I also tested the configuration in Matlab directly on Ubuntu (without python) and I get the same error.
Is there any difference between both .mex files that might cause these issues? Do you have any recommendation how to go forward, because originally Linux is my preferred OS.
Thanks for your support!
Best Regards!
Hi again,
I was looking at the code and I think that the individual Vmax, Amax and Jmax per axes are not being loaded properly in the dynamic_reconfigure_callback.
The parameters in the CFG file for Vmax, Amax and Jmax are an array, but in main.cpp these are loaded in as a single double.
Declarations of said parameters in main.cpp:
https://github.com/AIS-Bonn/opt_control/blob/master/ROS/opt_control/src/main.cpp#L76-L81
Place where said parameters are set in main.cpp:
https://github.com/AIS-Bonn/opt_control/blob/master/ROS/opt_control/src/main.cpp#L215-L236
Place where the inputs are set to the single values:
https://github.com/AIS-Bonn/opt_control/blob/master/ROS/opt_control/src/main.cpp#L402-L407
Thanks for making this available.
Just to avoid duplication of effort: would you perhaps already have a C/C++ implementation of this?
example
Invalid MEX-file 'C:\Users\pc\Desktop\Just Do It\one_iros\opt_control-master\matlab\opt_control_lib_mex.mexw64': The specified module could not be found.
error example (line 173)
[J_setp_struct,solution_out,T_waypoints,P,V,A,J,t] =
opt_control_lib_mex(State_start,Waypoints,V_max,V_min,A_max,A_min,J_max,J_min,A_global,b_comp_global,b_sync_V,b_sync_A,b_sync_J,b_sync_W,b_rotate,b_best_solution,b_hard_vel_limit,b_catch_up,solution_in,ts_rollout);
How to solve this problem?
What is the best way to retrieve the status of the optimization?
As in, which variable from opt_control_lib() should I read to know if the optimization succeeded?
I know there are print outs, but I want to use this status for other purposes.
Thanks for the library!
Hi there again!
Thank you so much for releasing the C++ static library.
I noticed that while the repo is under the BSD-3 license, the include headers mention that they are Student License only (perhaps because of Matlab code autogeneration).
Hello,
would it be possible to have the source code or a lib for windows?
Thank you
Hi, when i build the project by catkin_make
it shows
[ 83%] Built target opt_control_generate_messages_eus
make[2]: *** No rule to make target '/home/xjh/catkin_f1f2/src/lib/opt_control_lib.a', needed by '/home/xjh/catkin_f1f2/devel/lib/opt_control/opt_control_node'。 停止。
[ 83%] Built target opt_control_generate_messages
CMakeFiles/Makefile2:2049: recipe for target 'opt_control/ROS/opt_control/CMakeFiles/opt_control_node.dir/all' failed
make[1]: *** [opt_control/ROS/opt_control/CMakeFiles/opt_control_node.dir/all] Error 2
make[1]: *** 正在等待未完成的任务....
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
This is my env:
ubuntu 16.04
ROS kinetic
I don't know what's wrong.
Hello sir,
First of all, I would like to express my appreciation in sharing this trajectory generation library. The jerk bounded trajectory generation is very fast.
However, the undefined component (NaN) in the example.m could not run properly. I didn't change anything in your code except switching the index_example to 5 (The one with undefined component). The error message is as shown below.
Domain error. To compute complex results from real x, use 'sqrt(complex(x))'.
Error in coder.internal/error (line 19)
Error in sqrt (line 12)
Error in .^ (line 118)
Error in coder.internal/applyBinaryScalarFunction (line 40)
Error in .^ (line 58)
Error in .^ (line 49)
Error in ^ (line 40)
Error in ab_O_P (line 7)
Error in solve_O (line 209)
Error in synchronize_trajectory (line 44)
Error in opt_control (line 94)
Error in opt_control_lib (line 12)
Error in example (line 173)
[J_setp_struct,solution_out,T_waypoints,P,V,A,J,t] =
opt_control_lib_mex(State_start,Waypoints,V_max,V_min,A_max,A_min,J_max,J_min,A_global,b_comp_global,b_sync_V,b_sync_A,b_sync_J,b_sync_W,b_rotate,b_best_solution,b_hard_vel_limit,b_catch_up,solution_in,ts_rollout);
I believe the trajectory generation with undefined component will be very useful for multi-segment trajectory generation. It would be nice to see this bug be fixed. Thank you!
Please publish a precompiled .mexw64 file for Matlab Windows users. It seems to be a great implementation for synchronized trajectory generation. Thanks a lot!
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.