Closed hichamhendy closed 1 year ago
Do you get the report "Solution found!!!
?
How could I do that?
I can invite you to collaborate on my repo. Already done. You would need to publish a goal, so the callback works
All I need is the clone command and instructions for how to reproduce the error . I see the repo is private. I accepted the invite. Please open an issue in https://github.com/hichamhendy/mav_swarm_commander/issues for this problem
Done
As you asked yesterday:
I added the following
bool memory_ok = CppAD::thread_alloc::free_all(); std::string group = "swarm/Node"; size_t width = 20; CppAD::test_boolofvoid Run(group, width); bool ok_sum = Run.summary(memory_ok); ROS_INFO_STREAM(kStreamPrefix <<"Summary (mem): "<< ok_sum);
and got that
Begin test group swarm/Node memory_leak Error 1 tests failed. [ INFO] [1678189848.577661006, 17.832000000]: [Swarm Commanding]: Summary (mem): 0 [ INFO] [1678189848.577679643, 17.832000000]: [Swarm Commanding]: Solution found!!! [ INFO] [1678189848.577699892, 17.832000000]: [Swarm Commanding]: Cost: 0 { }
any ideas??? why the leak?!!!
I recently had a shoulder operation and it is still difficult for me to type. In addition, I am tying to solve a problem for work right now. I hope to be able to spend some time on your problem soon. Sorry for the delay.
No problem. Get well soon. Thank you anyway
After launching that in separate thread and activating the debug flag of CppAD i got this `Stack trace (most recent call last) in thread 24512:
Aborted (Signal sent by tkill() 24237 1000) Aborted (core dumped) `
I found the problem in the lower and upper boundaries of the variables exactly in
for (int i = thrust_command_start; i < n_vars; i++) { vars_lowerbound[i] = sys_constants.min_thrust; vars_upperbound[i] = - sys_constants.max_thrust; }
The solver kinda gave the impression that the formulation is well-defined but after analysis, especially by giving succeed in finding the solution even though the solution vector was empty.
I am trying the following on ROS
`Path modelPredictivePlanning(const Path& initial_path) {
Path optimized_path = initial_path; Eigen::Vector3d setting_point; size_t N = 6; double dt = 0.05; const size_t x_start = 0; const size_t y_start = x_start + N; const size_t z_start = y_start + N; const size_t x_dot_start = z_start + N; const size_t y_dot_start = x_dot_start + N; const size_t z_dot_start = y_dot_start + N; const size_t roll_start = z_dot_start + N; const size_t pitch_start = roll_start + N; const size_t roll_command_start = pitch_start + N; const size_t pitch_command_start = roll_command_start + N - 1; const size_t thrust_command_start = pitch_command_start + N - 1;
}`
However the solution vector in
x
is empty.By the way when I try to extract the error from that empty solution I get
cppad-20180000.0 error from a known source: vector: index greater than or equal vector size Error detected by false result for i < length_ at line 473 in the file /usr/include/cppad/utility/vector.hpp mav_swarm_commander_node: /usr/include/cppad/utility/error_handler.hpp:206: static void CppAD::ErrorHandler::Default(bool, int, const char*, const char*, const char*): Assertion
false' failed. Stack trace (most recent call last):19 Object "", at 0xffffffffffffffff, in
18 Source "/usr/include/c++/11/bits/basic_string.h", line 187, in _start [0x562a223e27a9]
` Any ideas?