CopterExpress / clover

ROS-based framework and RPi image to control PX4-powered drones 🍀
https://clover.coex.tech
MIT License
416 stars 266 forks source link

catkin make fail due to missing files error #454

Closed AlexWUrobot closed 1 year ago

AlexWUrobot commented 2 years ago

Thank you very much for your help I have installed MAVROS and AutoPilot and QGroundControl successfully, but when I try to catkin_make the clover_ws. It shows that No such file or directory image

okalachev commented 2 years ago

Seems as mavros wasn't correctly installed, because its dependent package mavros_msgs cannot be found. Or maybe you haven't sourced ROS' setup.bash?

AlexWUrobot commented 2 years ago

Yes, at the beginning, I put mavros in catkin_ws and catkin_build successfully and source devel/setup.bash image Then, it still cannot find the <mavros_msg/State.h> so I git clone one more mavros in clover_ws, and then catkin build again image

However, it shows the clover file is abandon from catkin build image image Next, I think that mavros already is caktin build successfully so I try to catkin build the clover package by this command "catkin build -j1 -i -v --no-deps clover" image However, it shows the same error "mavros_msg/State.h" in the end image

Thanks again for your reply : )

okalachev commented 2 years ago

First, ROS Noetic is recommended to use with Clover now (not Melodic). Second, have you followed this tutorial https://clover.coex.tech/en/simulation_native.html ?

AlexWUrobot commented 2 years ago

Thank you very much. Yes, I follow the installation link and git clone three packages and add mavros image

I am using Melodic on Jetson TX1 with Ubuntu 18.04. Is it feasible to use clover package on Melodic?

If not, do you know any other package can support speed and position control at the same time like this below line ?
navigate(x=3, y=0, z=0, speed=0.5, yaw=float('nan'), yaw_rate=0.2, frame_id='body')

Because PX4-AutoPilot only support Position control sample, I am frustrated to control the speed and position at the same time https://github.com/PX4/PX4-Autopilot/blob/main/integrationtests/python_src/px4_it/mavros/mavros_offboard_posctl_test.py

Really appreciate again

AlexWUrobot commented 2 years ago

I tried to remove mavros package from clover_ws and keep mavros package in catkin_ws. Next, I run " sudo apt-get install ros-melodic-mavros*" Then, catkin_make the clover_ws and the error change to this

image

AlexWUrobot commented 2 years ago

It looks 100% catkin build, so I ran roslaunch px4 mavros_posix_sitl.launch and python flight.py roslaunch px4 mavros_posix_sitl.launch (works, publish all /mavros/ topics data) but python flight.py shows error "rosgraph.masterapi.MasterError: no provider" image Besides, roslaunch clover_simulation simulator.launch works with some error image image Could we use the flight.py to control the drone in the PX4 Autopilot? Thanks : ) image

okalachev commented 2 years ago

Are you trying to run the simulation on Jetson, or the Clover packages themself to fly the real drone?

AlexWUrobot commented 2 years ago

No, I run the simulation and the Clover Packages on a PC with Ubuntu 18.04
Next step Yes, once the Clover Package goes well in PC simulation, I will run the Clover package on Jetson TX1 (with Ubuntu 18.04) to offboard control a real drone. Thanks for your patience and help again : )

okalachev commented 2 years ago

To run clover services, you need to run clover.launch file. And you don't need px4 package at all, because PX4 runs on a flight controller.

AlexWUrobot commented 2 years ago

image image If do not run px4, there is an error showing like this, but I have source path by bashrc. image

okalachev commented 2 years ago

If you do not have a vl53l1x rangefinder and a ws281x LED strip, you can turn their drivers off in clover.launch.

Also Clover's ws281x driver works only on a Raspberry Pi.