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

roslaunch error with px4 state (mavlink version) #774

Closed
SiddharthPatel45 opened this issue Aug 17, 2017 · 13 comments
Closed

roslaunch error with px4 state (mavlink version) #774

SiddharthPatel45 opened this issue Aug 17, 2017 · 13 comments
Labels

Comments

@SiddharthPatel45
Copy link

Hello community,

I am getting the error
Client [/rostopic_5927_1502794795953] wants topic /mavros/state to have datatype/md5sum [mavros_msgs/State/9e3d873fae342c8f48a8bd64c53d991e], but our version has [mavros_msgs/State/63d9a29b6abd9e0beeba06109556d062]. Dropping connection.
in roslaunch when I try to change the pixhawk mode or when I subscribe to /mavros/state from a different machine. I can see the topic on the same pc (on which roslaunch is run) but I cannot see any data and get this error when I try to do it on another pc of the ros network. I can still see other topics like /mavros/local_position/pose or /mavros/imu/data etc. but just when I change or want to see something related to state I get this error. One of my systems is running on Ubuntu 16.04 with ROS Kinetic and the other on Ubunut 14.04 with ros indigo.

Note: This never happened before. I used to run simulations on exactly this configuration for a long time and this was never a problem.

After searching for this error and trying to debug I found out that this is the mavlink/mavros version error. The mavlink/mavros on my ubuntu 16.04 has somehow upgraded to the latest 0.19 version and that is causing the problem. I know this because I checked the plugins which are loaded when we do roslauch mavros px4.launch and they are different then previous. So, I want to make sure that is this the version problem?? and how can I solve it?

If you need any further info do let me know.

Any ideas would help. Thanks!

@TSC21
Copy link
Member

TSC21 commented Aug 17, 2017

That's indeed a version problem. Follow src build instructions presented in https://github.com/mavlink/mavros/tree/master/mavros#installation on your 14.04 Indigo machine.

@SiddharthPatel45
Copy link
Author

SiddharthPatel45 commented Aug 17, 2017 via email

@TSC21
Copy link
Member

TSC21 commented Aug 17, 2017

But why is this happening now? When did it change.

Probably you issued a apt dist-upgrade or apt-get upgrade on your 16.04 machine that lead to upgrading it to MAVROS 0.19.

@SiddharthPatel45
Copy link
Author

SiddharthPatel45 commented Aug 17, 2017 via email

@SiddharthPatel45
Copy link
Author

SiddharthPatel45 commented Aug 18, 2017 via email

@TSC21
Copy link
Member

TSC21 commented Aug 18, 2017

apt-get remove ros-kinetic-mavros*. It does not overwrite since this is not an deb package install. See how catkin ws work.

@SiddharthPatel45
Copy link
Author

SiddharthPatel45 commented Aug 18, 2017 via email

@TSC21
Copy link
Member

TSC21 commented Aug 18, 2017

Just follow the same procedures.

@TSC21 TSC21 closed this as completed Aug 18, 2017
@SiddharthPatel45
Copy link
Author

@TSC21 Hey! thanks a lot. I just did mavros source installations and it worked. Great! Thanks a lot again.

@SiddharthPatel45
Copy link
Author

Actually, to install mavros 0.19 on Ubuntu 14.04 machine with ros indigo I had to modify the command line which selects mavros in the source installation
rosinstall_generator --upstream --rosdistro kinetic mavros | tee -a /tmp/mavros.rosinstall
and then it works. Thanks

@fabrizioschiano
Copy link

Hi, I had the same problem recently and thanks to this issue I understood that it could have been a mavros version issue

Therefore I decided to do
sudo apt-get remove ros-kinetic-mavros*

Then I looked well in my system if I had other occurrences of mavros that were in the wrong place with

sudo updatedb
locate mavros

I found some and deleted them

I then followed these instructions carefully and did a catkin clean (the equivalent of catkin_make clean if you built your environment with catkin_make instead of catkin build)

I then rebuilt my catkin_ws with catkin build and tried again to launch the ROS node that was causing the error and it worked.

I hope it will help someone who will have the same problem.

@SiddharthPatel45
Copy link
Author

Hi @fabrizioschiano
Thanks for the tip. Literally, just yesterday I was working with a new system and had this issue. So, upgraded mavros on both systems as you suggested, cleaned and rebuilt the catkin_ws.
It works fine now!
Cheers

@fabrizioschiano
Copy link

@Siddhu45 , I am glad my procedure helped you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants