Mavros: roslaunch error with px4 state (mavlink version)

Created on 17 Aug 2017  ·  13Comments  ·  Source: mavlink/mavros

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!

question

Most helpful comment

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.

All 13 comments

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.

                                                                                  So that will get my mavlink updated on the ubuntu 14.04 machine? Ok great. But why is this happening now? When did it change. I'll inform as soon as I try and make it work. Thanks a lot!                                                                                                                                                                                                                                                                                                                                        Sent from my BlackBerry 10 smartphone.                                                                                                                                                                                                                From: Nuno MarquesSent: Friday, 18 August, 2017 12:58 AMTo: mavlink/mavrosReply To: mavlink/mavrosCc: Siddharth Patel; AuthorSubject: Re: [mavlink/mavros] roslaunch error with px4 state (mavlink version) (#774)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.

—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or mute the thread.

{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/mavlink/mavros","title":"mavlink/mavros","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/mavlink/mavros"}},"updates":{"snippets":[{"icon":"PERSON","message":"@TSC21 in #774: 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."}],"action":{"name":"View Issue","url":"https://github.com/mavlink/mavros/issues/774#issuecomment-323132763"}}}

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.

                                                                                  Not sure because the 16.04 is a common machine and someone might have upgraded, no idea. Till 2 weeks back it was working properly but for the last 2 days I'm seeing this error. Anyways, let me do as you suggested and will let you know the results. Thanks again                                                                                                                                                                                                                                                                                                                                         Sent from my BlackBerry 10 smartphone.                                                                                                                                                                                                                From: Nuno MarquesSent: Friday, 18 August, 2017 1:07 AMTo: mavlink/mavrosReply To: mavlink/mavrosCc: Siddharth Patel; AuthorSubject: Re: [mavlink/mavros] roslaunch error with px4 state (mavlink version) (#774)

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.

—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or mute the thread.

{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/mavlink/mavros","title":"mavlink/mavros","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/mavlink/mavros"}},"updates":{"snippets":[{"icon":"PERSON","message":"@TSC21 in #774: \u003e But why is this happening now? When did it change.\r\n\r\nProbably you issued a apt dist-upgrade or apt-get upgrade on your 16.04 machine that lead to upgrading it to MAVROS 0.19."}],"action":{"name":"View Issue","url":"https://github.com/mavlink/mavros/issues/774#issuecomment-323134996"}}}

                                                                                  Also, how do I uninstall previous mavros version? Or I just install again and it will overwrite.                                                                                                                                                                                                                                                                                                                                         Sent from my BlackBerry 10 smartphone.                                                                                                                                                                                                                From: Nuno MarquesSent: Friday, 18 August, 2017 1:07 AMTo: mavlink/mavrosReply To: mavlink/mavrosCc: Siddharth Patel; AuthorSubject: Re: [mavlink/mavros] roslaunch error with px4 state (mavlink version) (#774)

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.

—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or mute the thread.

{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/mavlink/mavros","title":"mavlink/mavros","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/mavlink/mavros"}},"updates":{"snippets":[{"icon":"PERSON","message":"@TSC21 in #774: \u003e But why is this happening now? When did it change.\r\n\r\nProbably you issued a apt dist-upgrade or apt-get upgrade on your 16.04 machine that lead to upgrading it to MAVROS 0.19."}],"action":{"name":"View Issue","url":"https://github.com/mavlink/mavros/issues/774#issuecomment-323134996"}}}

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

                                                                                  Yes, I can do that. But what I meant was, on one of the device I did source installation of mavros previously. So how can I work around that? How do I update that. Thanks                                                                                                                                                                                                                                                                                                                                         Sent from my BlackBerry 10 smartphone.                                                                                                                                                                                                                From: Nuno MarquesSent: Friday, 18 August, 2017 8:41 AMTo: mavlink/mavrosReply To: mavlink/mavrosCc: Siddharth Patel; AuthorSubject: Re: [mavlink/mavros] roslaunch error with px4 state (mavlink version) (#774)apt-get remove ros-kinetic-mavros*. It does not overwrite since this is not an deb package install. See how catkin ws work.

—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or mute the thread.

{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/mavlink/mavros","title":"mavlink/mavros","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/mavlink/mavros"}},"updates":{"snippets":[{"icon":"PERSON","message":"@TSC21 in #774: apt-get remove ros-kinetic-mavros*. It does not overwrite since this is not an deb package install. See how catkin ws work."}],"action":{"name":"View Issue","url":"https://github.com/mavlink/mavros/issues/774#issuecomment-323230117"}}}

Just follow the same procedures.

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

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

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.

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

@siddhu45 , I am glad my procedure helped you

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mtsakaguchi picture mtsakaguchi  ·  5Comments

TeixeiraRafael picture TeixeiraRafael  ·  4Comments

mohand150 picture mohand150  ·  5Comments

zhahaoyu picture zhahaoyu  ·  12Comments

y22ma picture y22ma  ·  7Comments