weixin_39858245
2020-12-28 09:32 阅读 12

MAVROS Rc Override

hi all i have an issue using mavros with the PX4. The "rc chan override" doesn't work using the ArduRover firmware on the PX4: the mavros/rc/override appears on the topic list when i publish and it is full, but the rc/in and rc/out don't change (they have the values sent using the Fly Sky controller). I was able to override the channel using Roscopter without problems. Do you have any suggestions? let me know if you need more infos. Thanks a lot

该提问来源于开源项目:mavlink/mavros

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

8条回答 默认 最新

  • weixin_39553653 weixin_39553653 2020-12-28 09:32

    Did you setup GCS system id property on APM?

    Overrides only accepts from GCS system Id, so you should tell APM that number. By default it GCS is 255, mavros desined to be run at OBC as part of the system, so their default 1 (same as APM).

    You could: 1. Setup FCU property: rosrun mavros mavparam set SYSID_MYGCS 1 2. Use connection URL with ids= attribute, e.g. serial:///dev/ttyACM0:57600?ids=255,240

    点赞 评论 复制链接分享
  • weixin_39858245 weixin_39858245 2020-12-28 09:32

    Thank you, i've read about it in other issues but if i run that command ther result is Couldn't find executable named mavparam below /home/pc-casy/catkin_ws/src/mavros/mavros [rosrun] Found the following, but they're either not files, [rosrun] or not executable: [rosrun] /home/pc-casy/catkin_ws/src/mavros/mavros/scripts/mavparam so to do that i have to reach the /home/pc-casy/catkin_ws/src/mavros/mavros/scripts/mavparam directory and type python mavparam set SYSID_MYGCS 1 Now the override works, but you have some suggestions about the fail when i try to launch the mavparam node?? Thank you

    点赞 评论 复制链接分享
  • weixin_39553653 weixin_39553653 2020-12-28 09:32

    Maybe rosrun missed? In my current install of Indigo on 14.10 it don't exist, but i blamed my setup (because i must wait Jade for 14.10...).

    Also mavparam has shebang, so explicit calling python not required.

    点赞 评论 复制链接分享
  • weixin_39553653 weixin_39553653 2020-12-28 09:32

    Oh, or check file permissions all scripts should have exec perm (x).

    
    $ ls -la mavros/scripts
    total 64
    drwxrwxr-x 2 vovan vovan  4096 Oct 28 21:45 ./
    drwxrwxr-x 8 vovan vovan  4096 Jan 24 13:29 ../
    -rwxrwxr-x 1 vovan vovan 12133 Sep 22 17:20 mavcmd*
    -rwxrwxr-x 1 vovan vovan  4038 Sep 22 17:20 mavftp*
    -rwxrwxr-x 1 vovan vovan  4413 Sep 22 17:20 mavparam*
    -rwxrwxr-x 1 vovan vovan  3487 Sep 22 17:20 mavsafety*
    -rwxrwxr-x 1 vovan vovan  4758 Sep 22 17:20 mavsetp*
    -rwxrwxr-x 1 vovan vovan  5045 Sep 22 17:20 mavsys*
    -rwxrwxr-x 1 vovan vovan  9180 Oct 28 20:29 mavwp*
    
    点赞 评论 复制链接分享
  • weixin_39858245 weixin_39858245 2020-12-28 09:32

    Yes, thanks, it's all about the permissions!

    点赞 评论 复制链接分享
  • weixin_39553653 weixin_39553653 2020-12-28 09:32

    But git know what permissions should be...

    TODO: need add note about SYSID_MYGCS.

    点赞 评论 复制链接分享
  • weixin_39601743 weixin_39601743 2020-12-28 09:32

    I'm running into this same problem with Ardupilot. I'm sending rc override messages and I can see the change in rqt. But I'm not getting anything from the rc in or rc out topics, even when I have a transmitter plugged in and I can see values in mavlink inspector.

    I tried running the mavparam command, but I get an IOError from the /mavros/param/set service. Any ideas?

    
    ~/catkin_ws/src/mavros$ rosrun mavros mavparam set SYSID_MYGCS 1
    Traceback (most recent call last):
      File "/home/autonodyne-nano/catkin_ws/src/mavros/mavros/scripts/mavparam", line 104, in <module>
        main()
      File "/home/autonodyne-nano/catkin_ws/src/mavros/mavros/scripts/mavparam", line 100, in main
        args.func(args)
      File "/home/autonodyne-nano/catkin_ws/src/mavros/mavros/scripts/mavparam", line 63, in do_set
        print(param_set(args.param_id, val))
      File "/home/autonodyne-nano/catkin_ws/src/mavros/mavros/src/mavros/param.py", line 146, in param_set
        raise IOError(str(ex))
    IOError: service [/mavros/param/set] responded with an error: 
    
    </module>
    点赞 评论 复制链接分享
  • weixin_39761696 weixin_39761696 2020-12-28 09:32

    have you solved this issue? I met the same issue about setting SYSID_MYGCS

    点赞 评论 复制链接分享

相关推荐