ethz-asl / mav_control_rw

Control strategies for rotary wing Micro Aerial Vehicles using ROS
Apache License 2.0
347 stars 159 forks source link

catkin build error #18

Closed HusseinHazem closed 5 years ago

HusseinHazem commented 6 years ago

`hussein@Lenovo-ideapad:~/catkin_ws$ catkin build

Profile: default Extending: [env] /home/hussein/simulation/ros_catkin_ws/devel:/opt/ros/indigo Workspace: /home/hussein/catkin_ws

Source Space: [exists] /home/hussein/catkin_ws/src Log Space: [missing] /home/hussein/catkin_ws/logs Build Space: [exists] /home/hussein/catkin_ws/build Devel Space: [exists] /home/hussein/catkin_ws/devel Install Space: [unused] /home/hussein/catkin_ws/install DESTDIR: [unused] None

Devel Space Layout: linked Install Space Layout: None

Additional CMake Args: -DCMAKE_BUILD_TYPE=Release Additional Make Args: None Additional catkin Make Args: None Internal Make Job Server: True Cache Job Environments: False

Whitelisted Packages: None Blacklisted Packages: None

Workspace configuration appears valid.

NOTE: Forcing CMake to run for each package.

[build] Found '20' packages in 0.0 seconds.
[build] Updating package table.
Starting >>> catkin_tools_prebuild
Finished <<< catkin_tools_prebuild [ 1.2 seconds ]
Starting >>> catkin_simple
Starting >>> mav_msgs
Starting >>> rotors_comm
Starting >>> rotors_description
Finished <<< rotors_description [ 1.8 seconds ]
Starting >>> rotors_evaluation
Finished <<< catkin_simple [ 2.0 seconds ]
Starting >>> rqt_rotors
Finished <<< rotors_comm [ 3.7 seconds ]
Starting >>> eigen_catkin
Finished <<< rotors_evaluation [ 2.1 seconds ]
Finished <<< rqt_rotors [ 2.1 seconds ]
Finished <<< mav_msgs [ 4.3 seconds ]
Starting >>> mav_control_interface
Starting >>> mav_disturbance_observer
Starting >>> mav_lowlevel_attitude_controller


Warnings << eigen_catkin:make /home/hussein/catkin_ws/logs/eigen_catkin/build.make.000.log
abort: repository /home/hussein/catkin_ws/build/eigen_catkin/eigen_src-prefix/src/eigen_src not found! abort: repository /home/hussein/catkin_ws/build/eigen_catkin/eigen_src-prefix/src/eigen_src not found! CMake Warning at blas/CMakeLists.txt:32 (message): No fortran compiler has been detected, the blas build will be incomplete.

cd /home/hussein/catkin_ws/build/eigen_catkin; catkin build --get-env eigen_catkin | catkin env -si /usr/bin/make --jobserver-fds=6,7 -j; cd - .................................................................................................. Finished <<< eigen_catkin [ 14.2 seconds ]
Finished <<< mav_lowlevel_attitude_controller [ 20.2 seconds ]
Starting >>> planning_msgs
Finished <<< mav_disturbance_observer [ 21.6 seconds ]
Starting >>> rotors_control
Finished <<< planning_msgs [ 7.8 seconds ]
Starting >>> rotors_hil_interface


Errors << rotors_hil_interface:make /home/hussein/catkin_ws/logs/rotors_hil_interface/build.make.000.log In file included from /home/hussein/catkin_ws/src/rotors_simulator/rotors_hil_interface/src/hil_sensor_level_interface.cpp:17:0: /home/hussein/catkin_ws/src/rotors_simulator/rotors_hil_interface/include/rotors_hil_interface/hil_interface.h:22:37: fatal error: mavros_msgs/HilControls.h: No such file or directory

include <mavros_msgs/HilControls.h>

                                 ^

compilation terminated. make[2]: [CMakeFiles/rotors_hil_interface.dir/src/hil_sensor_level_interface.cpp.o] Error 1 make[1]: [CMakeFiles/rotors_hil_interface.dir/all] Error 2 make: *** [all] Error 2 cd /home/hussein/catkin_ws/build/rotors_hil_interface; catkin build --get-env rotors_hil_interface | catkin env -si /usr/bin/make --jobserver-fds=6,7 -j; cd - ................................................................................................ Failed << rotors_hil_interface:make [ Exited with code 2 ]
Failed <<< rotors_hil_interface [ 7.3 seconds ]
Abandoned <<< rotors_joy_interface [ Unrelated job failed ]
Abandoned <<< mav_linear_mpc [ Unrelated job failed ]
Abandoned <<< mav_nonlinear_mpc [ Unrelated job failed ]
Abandoned <<< rotors_gazebo_plugins [ Unrelated job failed ]
Abandoned <<< rotors_gazebo [ Unrelated job failed ]
Finished <<< rotors_control [ 25.7 seconds ]
Finished <<< mav_control_interface [ 50.4 seconds ]
[build] Summary: 13 of 19 packages succeeded.
[build] Ignored: 2 packages were skipped or are blacklisted.
[build] Warnings: 1 packages succeeded with warnings.
[build] Abandoned: 5 packages were abandoned.
[build] Failed: 1 packages failed.
[build] Runtime: 56.3 seconds total.
[build] Note: Workspace packages have changed, please re-source setup files to use them.`

rikba commented 6 years ago

You seem to have issues installing rotors_hil_interface. Either you can ignore this package, i.e., create a file called CATKIN_IGNORE in the rotors_hil_interface package folder or follow the installation instructions for the interface.

HusseinHazem commented 6 years ago

i got it to build all the packages except mav_linear_mpc. it gets stuck at make 66%. i was able to launch the nonlinear mpc one but i can't get it flying.

ZacharyTaylor commented 6 years ago

mav_linear_mpc takes a massive amount of time to build. Around 15 minutes is typical, though on some computers up to an hour is possible. You might just need to leave it a bit longer, I usually just catkin ignore it as mav_nonlinear fits most applications better.

HusseinHazem commented 6 years ago

thanks, i didn't let it past 12 minutes but i'll try leaving it longer, do you have any idea how i can get it to fly though? i tried using the rqt and but it says on the terminal 'Could not create message of type "mav_msgs/RollPitchYawrateThrust". '

ZacharyTaylor commented 6 years ago

I think I need some more context. Are you trying to use this on a real system or in simulation and if it is a real system what is the flight controller?

HusseinHazem commented 6 years ago

I want to fly it in in the simulation first, and eventually i’m hoping to implent the mpc on a real quadrotor, the flight controller is navio2.

HusseinHazem commented 6 years ago

I mean rasberrypi 3

ZacharyTaylor commented 6 years ago

mav_msgs/RollPitchYawrateThrust is a custom message type which is why rqt has trouble generating it. However, this message is the output of the controller, not an input so there is no need for you to create it yourself.

In order to output this message the controller needs an input of odometry with pose and twist information and a desired movement (either a pose waypoint or a trajectory).

The controller should be able to be made to work with our simultaor RotorS without too much difficulty.

The px4 firmware on the other hand by default does not support providing some angles as rates (yaw) and simultaneously giving others as angles (roll and pitch) because of this to work with the navio you will need to modify the px4 code and also the mavros interface to match px4 coordinate conventions. We have px4 and mavros forks that have this modification, however at present they are unfortunately not public.

HusseinHazem commented 6 years ago

i tried rostopic pub -1 nav_msgs/Odometry and input some parameters but it says "invalid topic type :header "

ZacharyTaylor commented 6 years ago

You will need an odometry message with a correct stamp in the header and have it published at a high rate (we use 100hz). I would suggest using a simulator to generate this data as it can be difficult to fake.

HusseinHazem commented 6 years ago

I tried the following using rqt https://imgur.com/a/hguZk but it doesn't move.

ZacharyTaylor commented 6 years ago

Could you post the output of rqt_graph? I want to double check all the topics are mapped correctly

HusseinHazem commented 6 years ago

https://imgur.com/a/WPH6b

ZacharyTaylor commented 6 years ago

screenshot from 2018-03-14 15-03-31

There seems to be something wrong with your setup (see mine above for reference, it uses the lee position controller, but the idea is the same). Currently your system doesn't have gazebo in the loop at all so can't be getting the correct odometry information

HusseinHazem commented 6 years ago

So what do you suggest i should do? Is there a way to include it in the loop? And does different versions of gazebo affect that?

fmina commented 6 years ago

you should not publish odometry from rqt. RotorS should publish it as it include the current state of the MAV. try the following in two separate terminals: roslaunch rotors_gazebo mav.launch and roslaunch mav_linear_mpc mav_linear_mpc_sim.launch open rqt and publish on /firefly/command/pose.

HusseinHazem commented 6 years ago

i tried that but i think zachary is right. Gazebo is not connected to any of the controller commands. https://imgur.com/a/WPH6b

ZacharyTaylor commented 6 years ago

If the rotors simulator outputs from gazebo are not in the loop, you must have a remapping of a topic done incorrectly. I would suggest using node_manager http://wiki.ros.org/node_manager_fkie as it allows you to see exactly what each node is publishing / subscribed to and makes debugging of these sort of issues much quicker.

fmina commented 6 years ago

Also, make sure you compiled rotors ros plugin and that you have it running.

HusseinHazem commented 6 years ago

i wasn't able to run the node_manager, any other ways i could fix that problem? and fmina how i do that?

fmina commented 6 years ago

You don't have to use node_manager, it would facilitate the debugging but is not essential. I am not sure what the problem is, we need more information to help you debugging the issue. First thing to try is to see if RotorS is working, try to launch the mav_hovering_example and see if the MAV hovers.

Hjayant commented 5 years ago

hi, I am using ubuntu16.04 and ros kinetic. There is error in catkin build. Any idea?? screenshot from 2018-12-05 06-19-09

helenol commented 5 years ago

@Hjayant sudo apt-get install liblapack-dev should hopefully fix it.

yiyongrobotics commented 5 years ago

hi, I am using ubuntu16.04 and ros kinetic. There is error in catkin build. Any idea?? screenshot from 2018-12-05 06-19-09

hi, have you solve this issue I now meet ?

rikba commented 5 years ago

Dear @gouyiyong

you are missing liblapacke. Installing

sudo apt-get install liblapacke-dev

as stated in the installation instruction should hopefully solve this issue.

yiyongrobotics commented 5 years ago

Dear @gouyiyong

you are missing liblapacke. Installing

sudo apt-get install liblapacke-dev

as stated in the installation instruction should hopefully solve this issue.

I installed, but the same problem. image