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

main branch build error while compiling on ROS-HUMBLE #2664

Closed
wei1224hf opened this issue Jan 27, 2024 · 9 comments
Closed

main branch build error while compiling on ROS-HUMBLE #2664

wei1224hf opened this issue Jan 27, 2024 · 9 comments
Labels
bug Something isn't working

Comments

@wei1224hf
Copy link

wei1224hf commented Jan 27, 2024

Description

Overview of your issue here.

Your environment

  • ROS Distro: [|Humble|]
  • OS Version: Ubuntu 22.04
  • Source build, main branch
  • Which RMW (Fast DDS or Cyclone DDS): rmw_cyclonedds_cpp

Steps to reproduce

1 install the humble branch already , from source .
2 find it do not contain moveit_py , so I install the main branch source and compile it , with command:
colcon build --event-handlers desktop_notification- status- --cmake-args -DCMAKE_BUILD_TYPE=Release --allow-overriding moveit_common moveit_core moveit_ros_planning

Expected behaviour

The compile process should be done

Actual behaviour

error comes out then compile process stopped

Backtrace or Console output

`--- stderr: moveit_core
In file included from /home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/src/acceleration_filter.cpp:35:
/home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/include/moveit/online_signal_smoothing/acceleration_filter.h:84:10: fatal error: types.h: No such file or directory
84 | #include <types.h>
| ^~~~~~~~~
compilation terminated.
gmake[2]: *** [online_signal_smoothing/CMakeFiles/moveit_acceleration_filter.dir/build.make:76: online_signal_smoothing/CMakeFiles/moveit_acceleration_filter.dir/src/acceleration_filter.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:1824: online_signal_smoothing/CMakeFiles/moveit_acceleration_filter.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs....
gmake: *** [Makefile:146: all] Error 2

Failed <<< moveit_core [15.8s, exited with code 2]

Summary: 11 packages finished [26.7s]
1 package failed: moveit_core
2 packages had stderr output: moveit_configs_utils moveit_core
35 packages not processed

@wei1224hf wei1224hf added the bug Something isn't working label Jan 27, 2024
@wei1224hf
Copy link
Author

wei1224hf commented Jan 28, 2024

may fixed this bug by modify this code:

/home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/include/moveit/online_signal_smoothing/acceleration_filter.h

line 84:

#include <types.h>
to
#include <sys/types.h>

but when I continue compile, another error comes out in this package:

`[Processing: moveit_core]
--- stderr: moveit_core
In file included from /home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/src/acceleration_filter.cpp:35:
/home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/include/moveit/online_signal_smoothing/acceleration_filter.h: In destructor ‘virtual online_signal_smoothing::AccelerationLimitedPlugin::~AccelerationLimitedPlugin()’:
/home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/include/moveit/online_signal_smoothing/acceleration_filter.h:132:20: error: cannot convert ‘OSQPWorkspace*’ {aka ‘OSQPWorkspace_’} to ‘OSQPSolver
132 | osqp_cleanup(osqp_workspace_);
| ^~~~~~~~~~~~~~~
| |
| OSQPWorkspace* {aka OSQPWorkspace_}
In file included from /usr/local/include/osqp/osqp.h:9,
from /home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/include/moveit/online_signal_smoothing/acceleration_filter.h:83,
from /home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/src/acceleration_filter.cpp:35:
/usr/local/include/osqp/osqp_api_functions.h:123:43: note: initializing argument 1 of ‘OSQPInt osqp_cleanup(OSQPSolver
)’
123 | OSQP_API OSQPInt osqp_cleanup(OSQPSolver* solver);
| ~~~~~~~~~~~~^~~~~~
In file included from /usr/local/include/osqp/osqp.h:8,
from /home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/include/moveit/online_signal_smoothing/acceleration_filter.h:83,
from /home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/src/acceleration_filter.cpp:35:
/usr/local/include/osqp/osqp_api_types.h:130:16: note: class type ‘OSQPWorkspace’ {aka ‘OSQPWorkspace_’} is incomplete
130 | typedef struct OSQPWorkspace_ OSQPWorkspace;
| ^~~~~~~~~~~~~~
/home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/src/acceleration_filter.cpp: At global scope:
/home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/src/acceleration_filter.cpp:60:15: error: ‘c_int’ was not declared in this scope; did you mean ‘u_int’?
60 | std::vector<c_int> row_indices;
| ^~~~~
| u_int
/home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/src/acceleration_filter.cpp:60:20: error: template argument 1 is invalid
60 | std::vector<c_int> row_indices;
| ^
/home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/src/acceleration_filter.cpp:60:20: error: template argument 2 is invalid
/home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/src/acceleration_filter.cpp:62:15: error: ‘c_int’ was not declared in this scope; did you mean ‘u_int’?
62 | std::vector<c_int> column_pointers;
| ^~~~~
| u_int
/home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/src/acceleration_filter.cpp:62:20: error: template argument 1 is invalid
62 | std::vector<c_int> column_pointers;
| ^
/home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/src/acceleration_filter.cpp:62:20: error: template argument 2 is invalid
/home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/src/acceleration_filter.cpp:66:3: error: ‘csc’ does not name a type
66 | csc csc_sparse_matrix;
| ^~~
/home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/src/acceleration_filter.cpp: In constructor ‘online_signal_smoothing::CSCWrapper::CSCWrapper(Eigen::SparseMatrix&)’:
/home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/src/acceleration_filter.cpp:72:5: error: ‘csc_sparse_matrix’ was not declared in this scope
72 | csc_sparse_matrix.n = M.cols();
| ^~~~~~~~~~~~~~~~~
/home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/src/acceleration_filter.cpp:74:17: error: request for member ‘assign’ in ‘((online_signal_smoothing::CSCWrapper*)this)->online_signal_smoothing::CSCWrapper::row_indices’, which is of non-class type ‘int’
74 | row_indices.assign(M.innerSize(), 0);
| ^~~~~~
/home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/src/acceleration_filter.cpp:75:39: error: request for member ‘data’ in ‘((online_signal_smoothing::CSCWrapper*)this)->online_signal_smoothing::CSCWrapper::row_indices’, which is of non-class type ‘int’
75 | csc_sparse_matrix.i = row_indices.data();
| ^~~~
/home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/src/acceleration_filter.cpp:76:21: error: request for member ‘assign’ in ‘((online_signal_smoothing::CSCWrapper*)this)->online_signal_smoothing::CSCWrapper::column_pointers’, which is of non-class type ‘int’
76 | column_pointers.assign(M.outerSize() + 1, 0);
| ^~~~~~
/home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/src/acceleration_filter.cpp:77:43: error: request for member ‘data’ in ‘((online_signal_smoothing::CSCWrapper*)this)->online_signal_smoothing::CSCWrapper::column_pointers’, which is of non-class type ‘int’
77 | csc_sparse_matrix.p = column_pointers.data();
| ^~~~
/home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/src/acceleration_filter.cpp: In member function ‘void online_signal_smoothing::CSCWrapper::update(Eigen::SparseMatrix&)’:
/home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/src/acceleration_filter.cpp:89:44: error: request for member ‘size’ in ‘((online_signal_smoothing::CSCWrapper*)this)->online_signal_smoothing::CSCWrapper::row_indices’, which is of non-class type ‘int’
89 | for (size_t ind = 0; ind < row_indices.size(); ++ind)
| ^~~~
/home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/src/acceleration_filter.cpp:91:18: error: invalid types ‘int[size_t {aka long unsigned int}]’ for array subscript
91 | row_indices[ind] = M.innerIndexPtr()[ind];
| ^
/home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/src/acceleration_filter.cpp:94:48: error: request for member ‘size’ in ‘((online_signal_smoothing::CSCWrapper*)this)->online_signal_smoothing::CSCWrapper::column_pointers’, which is of non-class type ‘int’
94 | for (size_t ind = 0; ind < column_pointers.size(); ++ind)
| ^~~~
/home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/src/acceleration_filter.cpp:96:22: error: invalid types ‘int[size_t {aka long unsigned int}]’ for array subscript
96 | column_pointers[ind] = M.outerIndexPtr()[ind];
| ^
/home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/src/acceleration_filter.cpp: At global scope:
/home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/src/acceleration_filter.cpp:138:3: error: ‘OSQPData’ does not name a type
138 | OSQPData data{};
| ^~~~~~~~
/home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/src/acceleration_filter.cpp: In constructor ‘online_signal_smoothing::OSQPDataWrapper::OSQPDataWrapper(Eigen::SparseMatrix&, Eigen::SparseMatrix&)’:
/home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/src/acceleration_filter.cpp:113:5: error: ‘data’ was not declared in this scope
113 | data.n = objective_sparse.rows();
| ^~~~
/home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/src/acceleration_filter.cpp:113:5: note: suggested alternatives:
In file included from /usr/include/c++/11/array:41,
from /usr/include/c++/11/tuple:39,
from /usr/include/c++/11/bits/unique_ptr.h:37,
from /usr/include/c++/11/memory:76,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:153,
from /home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/include/moveit/online_signal_smoothing/smoothing_base_class.h:41,
from /home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/include/moveit/online_signal_smoothing/acceleration_filter.h:77,
from /home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/src/acceleration_filter.cpp:35:
/usr/include/c++/11/bits/range_access.h:319:5: note: ‘std::data’
319 | data(initializer_list<Tp> il) noexcept
| ^~~~
/usr/include/c++/11/bits/range_access.h:290:5: note: ‘std::data’
290 | data(Container& cont) noexcept(noexcept(cont.data()))
| ^~~~
/home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/src/acceleration_filter.cpp:115:17: error: ‘struct online_signal_smoothing::CSCWrapper’ has no member named ‘csc_sparse_matrix’
115 | data.P = &P.csc_sparse_matrix;
| ^~~~~~~~~~~~~~~~~
/home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/src/acceleration_filter.cpp:118:17: error: ‘struct online_signal_smoothing::CSCWrapper’ has no member named ‘csc_sparse_matrix’
118 | data.A = &A.csc_sparse_matrix;
| ^~~~~~~~~~~~~~~~~
/home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/src/acceleration_filter.cpp: In member function ‘void online_signal_smoothing::OSQPDataWrapper::updateA(OSQPWorkspace*, Eigen::SparseMatrix&)’:
/home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/src/acceleration_filter.cpp:130:5: error: ‘osqp_update_A’ was not declared in this scope; did you mean ‘osqp_update_rho’?
130 | osqp_update_A(work, A.elements.data(), OSQP_NULL, A.elements.size());
| ^~~~~~~~~~~~~
| osqp_update_rho
/home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/src/acceleration_filter.cpp: In member function ‘virtual bool online_signal_smoothing::AccelerationLimitedPlugin::initialize(rclcpp::Node::SharedPtr, moveit::core::RobotModelConstPtr, size_t)’:
/home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/src/acceleration_filter.cpp:190:18: error: ‘struct OSQPSettings’ has no member named ‘warm_start’; did you mean ‘warm_starting’?
190 | osqp_settings
.warm_start = 0;
| ^~~~~~~~~~
| warm_starting
/home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/src/acceleration_filter.cpp:195:49: error: ‘using element_type = struct online_signal_smoothing::OSQPDataWrapper’ {aka ‘struct online_signal_smoothing::OSQPDataWrapper’} has no member named ‘data’
195 | if (osqp_setup(&osqp_workspace
, &osqp_data
->data, &osqp_settings
) != 0)
| ^~~~
/home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/src/acceleration_filter.cpp:199:47: error: ‘using element_type = struct online_signal_smoothing::OSQPDataWrapper’ {aka ‘struct online_signal_smoothing::OSQPDataWrapper’} has no member named ‘data’
199 | osqp_setup(&osqp_workspace
, &osqp_data
->data, &osqp_settings
);
| ^~~~
/home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/src/acceleration_filter.cpp: In function ‘bool online_signal_smoothing::updateData(const OSQPDataWrapperPtr&, OSQPWorkspace*, Eigen::SparseMatrix&, const VectorXd&, const VectorXd&)’:
/home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/src/acceleration_filter.cpp:244:15: error: ‘osqp_update_bounds’ was not declared in this scope; did you mean ‘osqp_update_settings’?
244 | return 0 == osqp_update_bounds(work, data->l.data(), data->u.data());
| ^~~~~~~~~~~~~~~~~~
| osqp_update_settings
/home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/src/acceleration_filter.cpp: In member function ‘virtual bool online_signal_smoothing::AccelerationLimitedPlugin::doSmoothing(Eigen::VectorXd&, Eigen::VectorXd&, Eigen::VectorXd&)’:
/home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/src/acceleration_filter.cpp:311:23: error: cannot convert ‘OSQPWorkspace*’ {aka ‘OSQPWorkspace’} to ‘OSQPSolver
311 | else if (osqp_solve(osqp_workspace_) == 0 &&
| ^~~~~~~~~~~~~~~
| |
| OSQPWorkspace* {aka OSQPWorkspace_}
In file included from /usr/local/include/osqp/osqp.h:9,
from /home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/include/moveit/online_signal_smoothing/acceleration_filter.h:83,
from /home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/src/acceleration_filter.cpp:35:
/usr/local/include/osqp/osqp_api_functions.h:111:41: note: initializing argument 1 of ‘OSQPInt osqp_solve(OSQPSolver
)’
111 | OSQP_API OSQPInt osqp_solve(OSQPSolver* solver);
| ~~~~~~~~~~~~^~~~~~
In file included from /usr/local/include/osqp/osqp.h:8,
from /home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/include/moveit/online_signal_smoothing/acceleration_filter.h:83,
from /home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/src/acceleration_filter.cpp:35:
/usr/local/include/osqp/osqp_api_types.h:130:16: note: class type ‘OSQPWorkspace’ {aka ‘OSQPWorkspace_’} is incomplete
130 | typedef struct OSQPWorkspace_ OSQPWorkspace;
| ^~~~~~~~~~~~~~
/home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/src/acceleration_filter.cpp:312:27: error: invalid use of incomplete type ‘OSQPWorkspace’ {aka ‘struct OSQPWorkspace_’}
312 | osqp_workspace_->solution->x[0] >= ALPHA_LOWER_BOUND - osqp_settings_.eps_abs &&
| ^~
In file included from /usr/local/include/osqp/osqp.h:8,
from /home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/include/moveit/online_signal_smoothing/acceleration_filter.h:83,
from /home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/src/acceleration_filter.cpp:35:
/usr/local/include/osqp/osqp_api_types.h:130:16: note: forward declaration of ‘OSQPWorkspace’ {aka ‘struct OSQPWorkspace_’}
130 | typedef struct OSQPWorkspace_ OSQPWorkspace;
| ^~~~~~~~~~~~~~
/home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/src/acceleration_filter.cpp:313:27: error: invalid use of incomplete type ‘OSQPWorkspace’ {aka ‘struct OSQPWorkspace_’}
313 | osqp_workspace_->solution->x[0] <= ALPHA_UPPER_BOUND + osqp_settings_.eps_abs)
| ^~
In file included from /usr/local/include/osqp/osqp.h:8,
from /home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/include/moveit/online_signal_smoothing/acceleration_filter.h:83,
from /home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/src/acceleration_filter.cpp:35:
/usr/local/include/osqp/osqp_api_types.h:130:16: note: forward declaration of ‘OSQPWorkspace’ {aka ‘struct OSQPWorkspace_’}
130 | typedef struct OSQPWorkspace_ OSQPWorkspace;
| ^~~~~~~~~~~~~~
/home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/src/acceleration_filter.cpp:315:35: error: invalid use of incomplete type ‘OSQPWorkspace’ {aka ‘struct OSQPWorkspace_’}
315 | double alpha = osqp_workspace_->solution->x[0];
| ^~
In file included from /usr/local/include/osqp/osqp.h:8,
from /home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/include/moveit/online_signal_smoothing/acceleration_filter.h:83,
from /home/gene/ws_moveit2_main/src/moveit2/moveit_core/online_signal_smoothing/src/acceleration_filter.cpp:35:
/usr/local/include/osqp/osqp_api_types.h:130:16: note: forward declaration of ‘OSQPWorkspace’ {aka ‘struct OSQPWorkspace_’}
130 | typedef struct OSQPWorkspace_ OSQPWorkspace;
| ^~~~~~~~~~~~~~
gmake[2]: *** [online_signal_smoothing/CMakeFiles/moveit_acceleration_filter.dir/build.make:76: online_signal_smoothing/CMakeFiles/moveit_acceleration_filter.dir/src/acceleration_filter.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:1824: online_signal_smoothing/CMakeFiles/moveit_acceleration_filter.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs....
gmake: *** [Makefile:146: all] Error 2

Failed <<< moveit_core [30.6s, exited with code 2]

Summary: 11 packages finished [46.2s]
1 package failed: moveit_core
2 packages had stderr output: moveit_configs_utils moveit_core
35 packages not processed
`

@wei1224hf
Copy link
Author

what version of osqp is moveit2 using?
I download and compile and using the newest osqp

@wei1224hf
Copy link
Author

I switch to ROS-IRON because humble dose not support moveit-py right now.
With ROS-IRON , I failed with souce install moveit-py , successed with binary install moveit-py.

@github-project-automation github-project-automation bot moved this to ✅ Done in MoveIt Feb 3, 2024
@evelyn-fu
Copy link

Hi, did you ever figure out which version of OSQP is needed to build moveit2 on ros-iron? Thanks!

@adamanov
Copy link

same here, are you guys could build main branch on humble?

@Rainerino
Copy link

It doesn't work with humble out of the box for me neither. I fixed it related errors by using OSQP release 0.6.3 https://github.com/osqp/osqp/releases/tag/v0.6.3

@adamanov
Copy link

I could compile the Moveit main branch on humble with the following

colcon build --event-handlers desktop_notification- status- --cmake-args -DCMAKE_BUILD_TYPE=Release --parallel-workers 2 

i.e. by setting --parallel-workers 2

@followthwhiterabbit
Copy link

followthwhiterabbit commented Jun 22, 2024

I could compile the Moveit main branch on humble with the following

colcon build --event-handlers desktop_notification- status- --cmake-args -DCMAKE_BUILD_TYPE=Release --parallel-workers 2 

i.e. by setting --parallel-workers 2

it didn't work for me, still struggling to run moveit for a week now

@lnss1-ua
Copy link

It doesn't work with humble out of the box for me neither. I fixed it related errors by using OSQP release 0.6.3 https://github.com/osqp/osqp/releases/tag/v0.6.3

Could you tell me how to use it? i downloaded the linux tar but I don't if i have to install something or what.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants