Home        Store        Docs        Blog

Problems installing mavros in ros package


(Vegard Stürzinger) #1

Hi, still a newbie with shell but i got as far as installing ros on the rov, buy when i use catkin_make in /catkin_ws/ i got an error message:

/home/ubuntu/catkin_ws/src/bluerov/src/pilot.cpp:10:36: fatal error: mavros/ActuatorControl.h: No such file or directory
#include <mavros/ActuatorControl.h>
compilation terminated.
/home/ubuntu/catkin_ws/src/bluerov/src/simple_pilot.cpp:10:32: fatal error: mavros/CommandLong.h: No such file or directory
#include <mavros/CommandLong.h>
compilation terminated.
make[2]: *** [bluerov/CMakeFiles/pilot.dir/src/pilot.cpp.o] Error 1
make[1]: *** [bluerov/CMakeFiles/pilot.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs…
make[2]: *** [bluerov/CMakeFiles/simple_pilot.dir/src/simple_pilot.cpp.o] Error 1
make[1]: *** [bluerov/CMakeFiles/simple_pilot.dir/all] Error 2
make: *** [all] Error 2
Invoking “make -j4 -l4” failed

Greatly appreciate all advice and solutions:)


(Jacob) #2

I am not sure if anyone else has had this running out of the gate in the current version on github. Maybe some update has been applied since they wrote the code. This is what worked for me:

change

#include <mavros/CommandLong.h>

to

#include <mavros_msgs/CommandLong.h>

In the same file, replace all occurrences of

mavros::CommandLong

with

mavros_msgs::CommandLong

 

Fix the ActuatorControl issue in the same manner.

 


(Vegard Stürzinger) #3

Thanks Jacob, since i am well a newbie. could you point me to which files i should edit the way you said?

Its the second time youre helping me :stuck_out_tongue: but this is actually the first time i ever thinkered with something like this.


(Jacob) #4

The files are specified in the output you posted.

/home/ubuntu/catkin_ws/src/bluerov/src/pilot.cpp:10:36: fatal error: mavros/ActuatorControl.h: No such file or directory
#include <mavros/ActuatorControl.h>

means line 10 in pilot.cpp, column 36

Change that include line to what I mentioned, and also all other occurrences in the same file.

Same with simple_pilot.

 


(Vegard Stürzinger) #5

Wow, that worked! now i just got a warning that there was a clock skew, but i guess thats just adjusting the clock of the raspberry pi to correct time?

and thank you very much, you are a great help!


(Jacob) #6

Please paste the output regarding a clock skew, I have not encountered this.

Glad to help.


(Andrew) #7

Hi Vegard,

I had that same clock skew message arise last week when I was also installing the ROS package for the first time.

Here’s what worked for me - hope it helps.

  1. Check that the time synchronization is set up on your Raspberry Pi - https://help.ubuntu.com/lts/serverguide/NTP.html
  2. Run: catkin_make clean (this ensure that make can start fresh and not try an incremental build with files that may have an incorrect datestamp)
  3. Run: catkin_make again

(Vegard Stürzinger) #8

Thanks! when i tested the setup i kept getting error messages so i started again with configuring the RPI.

but now i have trouble with server certificates… But anyway thanks for your help!


(Josh) #9

Hey Vegard, Jacob,

The errors you are mentioning were fixed a few months ago and have been available in the repository’s #develop branch.

In addition, we just released v0.4.0 of the bluerov-ros-pkg this morning. This is the last release supporting the APM for the moment. We might re-incorporate it in the future, but for now we are focusing on the PixHawk platform.

As early adopters of the BlueROV, please use the #develop branch of the repository! Thanks.

Josh


(Vegard Stürzinger) #10

So i have now atleast reached the usage stage :slight_smile:

but for some reason the mavros node wont start or atleast i cant connect to the rov.

i can ssh in but there is no video feed or response to using the xbox controller. And the mavros doesent show up on the rqt screen either.

here is some output frommwhen i started roslaunch bluerov rov_core.launch

[ INFO] [1421633000.132180427]: Built-in MAVLink dialect: ardupilotmega
[ INFO] [1421633000.132878032]: MAVROS started. MY ID [1, 240], TARGET ID [1, 1]
Unhandled exception in thread started by
sys.excepthook is missing
lost sys.stderr
[ERROR] [1421633000.687913031]: FCU: Calibrating barometer
[ INFO] [1421633000.691777354]: CON: Got HEARTBEAT, connected.
[ERROR] [1421633001.738189593]: FCU: command received:
[ WARN] [1421633001.740006781]: CMD: Unexpected command 520, result 3
[ERROR] [1421633001.885296364]: FCU: Warming up ADC…
[ERROR] [1421633002.383682406]: FCU: Beginning INS calibration; do not
move vehicle
[ERROR] [1421633002.686745218]: FCU: <startup_ground> GROUND START
[ WARN] [1421633002.705496104]: VER: broadcast request timeout, retries left 4
[ERROR] [1421633002.723766208]: FCU: command received:
[ WARN] [1421633003.708818082]: VER: broadcast request timeout, retries left 3
[ERROR] [1421633003.737919853]: FCU: command received:
[ERROR] [1421633004.702895113]: FCU: Initialising APM…
[ERROR] [1421633004.719529384]: FCU: command received:
[ WARN] [1421633004.720891415]: VER: unicast request timeout, retries left 2
[ERROR] [1421633005.623909748]: FCU:

Ready to drive.
[ WARN] [1421633005.643760946]: GP: No GPS fix
[ WARN] [1421633005.721828759]: VER: unicast request timeout, retries left 1
[ERROR] [1421633006.609777665]: FCU: command received:
[ WARN] [1421633006.723407664]: VER: unicast request timeout, retries left 0
[ERROR] [1421633007.607447300]: FCU: command received:
[ WARN] [1421633007.721994591]: VER: your FCU don’t support
AUTOPILOT_VERSION, switched to default capabilities
[ERROR] [1421633007.729473914]: FCU: command received:
[ERROR] [1421633010.613553965]: FCU: Failsafe trigger 0x1
[ERROR] [1421633010.736554434]: FCU: ArduRover v2.48 (7d12c24a)
[ INFO] [1421633015.185671047]: PR: parameters list received
[ INFO] [1421633015.721642765]: WP: mission received

 

anyhu, thanks for any help up to this point and for any advice you can give me :slight_smile:


(Jacob) #11

For the xbox controller, try changing /dev/input/js0 to /dev/input/js1 in /launch/teleop_xbox.launch. This needs to be switched manually from time to time.

 

It looks like mavros is starting fine, besides loosing stderr. I don’t think that should be a big issue in getting it to communicate with your workstation.

Are you running roscore on only one machine? If so, which machine?

 


(Vegard Stürzinger) #12

I had that problem earlier and solved it how you described it.

I didnt realize that i had to specify adress the IP in th ROS_MASTER_URI and ROS_IP.

But now i can controll the thrusters and everything works :slight_smile:

Do you by any chance know which outputs und the APM correspond with which thruster? it doesent make sense in the way i use the controller…

Thanks again :slight_smile:


(Jacob) #13

There are numberings here http://docs.bluerobotics.com/bluerov/#assembly. I am not sure if those correspond to the motor output slots on the apm.

Forward and strafing motion should be on the left stick, and the right stick should be yaw and climb/descend.