Skip to content

catkin_make errors #4

@ltf1001

Description

@ltf1001

Thanks to the author for sharing such an excellent works.The following two errors occurred when I reproduced the above work.
The first question is about the use of DSP_map:
When I run this perception algorithm, the corresponding rviz's perception camera position is fixed in the middle of rviz, and cannot change with the camera position. How should I modify it so that the perception position can change with the camera position?
The second question is about catkin_make of RAST_corridor_planning:
When I run catkin_make, I get a lot of errors. The relevant errors are as follows:
from /home/whj/RAST/src/RAST_corridor_planning/src/corridor_minisnap.cpp:12:
/home/whj/RAST/src/RAST_corridor_planning/include/CorridorMiniSnap/iosqp.hpp:40:12: error: ‘c_int’ does not name a type; did you mean ‘u_int’?
40 | inline c_int setMats(Eigen::SparseMatrix &P,
| ^~~~~
| u_int
/home/whj/RAST/src/RAST_corridor_planning/include/CorridorMiniSnap/iosqp.hpp:101:12: error: ‘c_int’ does not name a type; did you mean ‘u_int’?
101 | inline c_int solve() const
| ^~~~~
| u_int
/home/whj/RAST/src/RAST_corridor_planning/include/CorridorMiniSnap/iosqp.hpp:106:12: error: ‘c_int’ does not name a type; did you mean ‘u_int’?
106 | inline c_int getStatus() const
| ^~~~~
| u_int
/home/whj/RAST/src/RAST_corridor_planning/include/CorridorMiniSnap/iosqp.hpp:120:5: error: ‘OSQPData’ does not name a type
120 | OSQPData pData;
| ^~~~~~~~
/home/whj/RAST/src/RAST_corridor_planning/include/CorridorMiniSnap/iosqp.hpp: In constructor ‘IOSQP::IOSQP()’:
/home/whj/RAST/src/RAST_corridor_planning/include/CorridorMiniSnap/iosqp.hpp:20:15: error: class ‘IOSQP’ does not have any field named ‘pData’
20 | pData(nullptr)
| ^~~~~
/home/whj/RAST/src/RAST_corridor_planning/include/CorridorMiniSnap/iosqp.hpp:22:37: error: ‘c_malloc’ was not declared in this scope; did you mean ‘malloc’?
22 | pSettings = (OSQPSettings )c_malloc(sizeof(OSQPSettings));
| ^~~~~~~~
| malloc
/home/whj/RAST/src/RAST_corridor_planning/include/CorridorMiniSnap/iosqp.hpp:23:9: error: ‘pData’ was not declared in this scope
23 | pData = (OSQPData )c_malloc(sizeof(OSQPData));
| ^~~~~
/home/whj/RAST/src/RAST_corridor_planning/include/CorridorMiniSnap/iosqp.hpp:23:18: error: ‘OSQPData’ was not declared in this scope
23 | pData = (OSQPData )c_malloc(sizeof(OSQPData));
| ^~~~~~~~
/home/whj/RAST/src/RAST_corridor_planning/include/CorridorMiniSnap/iosqp.hpp:23:28: error: expected primary-expression before ‘)’ token
23 | pData = (OSQPData )c_malloc(sizeof(OSQPData));
| ^
/home/whj/RAST/src/RAST_corridor_planning/include/CorridorMiniSnap/iosqp.hpp: In destructor ‘IOSQP::~IOSQP()’:
/home/whj/RAST/src/RAST_corridor_planning/include/CorridorMiniSnap/iosqp.hpp:31:26: error: cannot convert ‘OSQPWorkspace
’ {aka ‘OSQPWorkspace_
’} to ‘OSQPSolver

31 | osqp_cleanup(pWork);
| ^~~~~
| |
| OSQPWorkspace
{aka OSQPWorkspace_
}
In file included from /usr/local/include/osqp/osqp.h:9,
from /home/whj/RAST/src/RAST_corridor_planning/include/CorridorMiniSnap/iosqp.hpp:4,
from /home/whj/RAST/src/RAST_corridor_planning/include/CorridorMiniSnap/corridor_minisnap.h:19,
from /home/whj/RAST/src/RAST_corridor_planning/src/corridor_minisnap.cpp:12:
/usr/local/include/osqp/osqp_api_functions.h:133:43: note: initializing argument 1 of ‘OSQPInt osqp_cleanup(OSQPSolver*)’
133 | OSQP_API OSQPInt osqp_cleanup(OSQPSolver* solver);
| ~~~~~~~~~~~~^~~~~~
In file included from /usr/local/include/osqp/osqp.h:8,
from /home/whj/RAST/src/RAST_corridor_planning/include/CorridorMiniSnap/iosqp.hpp:4,
from /home/whj/RAST/src/RAST_corridor_planning/include/CorridorMiniSnap/corridor_minisnap.h:19,
from /home/whj/RAST/src/RAST_corridor_planning/src/corridor_minisnap.cpp:12:
/usr/local/include/osqp/osqp_api_types.h:135:16: note: class type ‘OSQPWorkspace’ {aka ‘OSQPWorkspace_’} is incomplete
135 | typedef struct OSQPWorkspace_ OSQPWorkspace;
| ^~~~~~~~~~~~~~
In file included from /home/whj/RAST/src/RAST_corridor_planning/include/CorridorMiniSnap/corridor_minisnap.h:19,
from /home/whj/RAST/src/RAST_corridor_planning/src/corridor_minisnap.cpp:12:
/home/whj/RAST/src/RAST_corridor_planning/include/CorridorMiniSnap/iosqp.hpp:33:13: error: ‘c_free’ was not declared in this scope; did you mean ‘free’?
33 | c_free(pSettings);
| ^~~~~~
| free
/home/whj/RAST/src/RAST_corridor_planning/include/CorridorMiniSnap/iosqp.hpp:34:13: error: ‘pData’ was not declared in this scope
34 | if (pData)
| ^~~~~
/home/whj/RAST/src/RAST_corridor_planning/include/CorridorMiniSnap/iosqp.hpp:35:13: error: ‘c_free’ was not declared in this scope; did you mean ‘free’?
35 | c_free(pData);
| ^~~~~~
| free
/home/whj/RAST/src/RAST_corridor_planning/include/CorridorMiniSnap/iosqp.hpp: In member function ‘Eigen::VectorXd IOSQP::getPrimalSol() const’:
/home/whj/RAST/src/RAST_corridor_planning/include/CorridorMiniSnap/iosqp.hpp:113:55: error: invalid use of incomplete type ‘OSQPWorkspace’ {aka ‘struct OSQPWorkspace_’}
113 | return Eigen::Map(pWork->solution->x,
| ^~
In file included from /usr/local/include/osqp/osqp.h:8,
from /home/whj/RAST/src/RAST_corridor_planning/include/CorridorMiniSnap/iosqp.hpp:4,
from /home/whj/RAST/src/RAST_corridor_planning/include/CorridorMiniSnap/corridor_minisnap.h:19,
from /home/whj/RAST/src/RAST_corridor_planning/src/corridor_minisnap.cpp:12:
/usr/local/include/osqp/osqp_api_types.h:135:16: note: forward declaration of ‘OSQPWorkspace’ {aka ‘struct OSQPWorkspace_’}
135 | typedef struct OSQPWorkspace_ OSQPWorkspace;
| ^~~~~~~~~~~~~~
In file included from /home/whj/RAST/src/RAST_corridor_planning/include/CorridorMiniSnap/corridor_minisnap.h:19,
from /home/whj/RAST/src/RAST_corridor_planning/src/corridor_minisnap.cpp:12:
/home/whj/RAST/src/RAST_corridor_planning/include/CorridorMiniSnap/iosqp.hpp:114:55: error: invalid use of incomplete type ‘OSQPWorkspace’ {aka ‘struct OSQPWorkspace_’}
114 | pWork->data->n);
| ^~
In file included from /usr/local/include/osqp/osqp.h:8,
from /home/whj/RAST/src/RAST_corridor_planning/include/CorridorMiniSnap/iosqp.hpp:4,
from /home/whj/RAST/src/RAST_corridor_planning/include/CorridorMiniSnap/corridor_minisnap.h:19,
from /home/whj/RAST/src/RAST_corridor_planning/src/corridor_minisnap.cpp:12:
/usr/local/include/osqp/osqp_api_types.h:135:16: note: forward declaration of ‘OSQPWorkspace’ {aka ‘struct OSQPWorkspace_’}
135 | typedef struct OSQPWorkspace_ OSQPWorkspace;
| ^~~~~~~~~~~~~~
/home/whj/RAST/src/RAST_corridor_planning/src/corridor_minisnap.cpp: In member function ‘bool traj_opt::MiniSnap::solveQP()’:
/home/whj/RAST/src/RAST_corridor_planning/src/corridor_minisnap.cpp:361:10: error: ‘class IOSQP’ has no member named ‘setMats’
361 | solver.setMats(Q, q, A, _lb, _ub, 1e-3, 1e-3);
| ^~~~~~~
/home/whj/RAST/src/RAST_corridor_planning/src/corridor_minisnap.cpp:362:10: error: ‘class IOSQP’ has no member named ‘solve’
362 | solver.solve();
| ^~~~~
/home/whj/RAST/src/RAST_corridor_planning/src/corridor_minisnap.cpp: In member function ‘bool traj_opt::CorridorMiniSnap::primarySolveQP()’:
/home/whj/RAST/src/RAST_corridor_planning/src/corridor_minisnap.cpp:574:3: error: ‘c_int’ was not declared in this scope; did you mean ‘u_int’?
574 | c_int flag = solver.setMats(Q, q, A, _lb, _ub, 1e-3, 1e-3);
| ^~~~~
| u_int
/home/whj/RAST/src/RAST_corridor_planning/src/corridor_minisnap.cpp:576:7: error: ‘flag’ was not declared in this scope
576 | if (flag != 0) {
| ^~~~
/home/whj/RAST/src/RAST_corridor_planning/src/corridor_minisnap.cpp:580:10: error: ‘class IOSQP’ has no member named ‘solve’
580 | solver.solve();
| ^~~~~
/home/whj/RAST/src/RAST_corridor_planning/src/corridor_minisnap.cpp:581:8: error: expected ‘;’ before ‘status’
581 | c_int status = solver.getStatus();
| ^~~~~~~
| ;
/home/whj/RAST/src/RAST_corridor_planning/src/corridor_minisnap.cpp:584:7: error: ‘status’ was not declared in this scope; did you mean ‘static’?
584 | if (status == 1 || status == 2) {
| ^~~~~~
| static
/home/whj/RAST/src/RAST_corridor_planning/src/corridor_minisnap.cpp:566:9: warning: control reaches end of non-void function [-Wreturn-type]
566 | IOSQP solver;
| ^~~~~~
make[2]: *** [RAST_corridor_planning/CMakeFiles/MINIMUM_SNAP_CORRIDOR.dir/build.make:76:RAST_corridor_planning/CMakeFiles/MINIMUM_SNAP_CORRIDOR.dir/src/corridor_minisnap.cpp.o] 错误 1
make[1]: *** [CMakeFiles/Makefile2:1699:RAST_corridor_planning/CMakeFiles/MINIMUM_SNAP_CORRIDOR.dir/all] 错误 2
make[1]: *** 正在等待未完成的任务....
[ 96%] Linking CXX executable /home/whj/RAST/devel/lib/rast_corridor_planning/map_sim_example
How should I modify to solve the above error?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions