weixin_39761573
2020-12-27 03:56 阅读 2

Mavros command services

This is only bug and feature tracker, please use it to report bugs or request features.

Issue details

I have a question can I use command.takeoff(), command.land() and command.arm() from mavros, without making a ros node, but instead using a normal python code ? if yes, how is that possible and why ?

MAVROS version and platform

Mavros: ?0.18.4? ROS: ?Kinetic? Ubuntu: ?16.04?

Autopilot type and version

[x] ArduPilot [ ] PX4

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

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

6条回答 默认 最新

  • weixin_39926749 weixin_39926749 2020-12-27 03:56

    hey, try this: rosrun mavros mavcmd takeoff for further information about how this work , you can look at this directiry---->MAVROS/mavros/scripts

    点赞 评论 复制链接分享
  • weixin_39761573 weixin_39761573 2020-12-27 03:56

    I already have a python code which is not a ros node, it uses MAVROS services, such as arming, taking off and landing. I was wondering how was that possible. I imported from mavros, command

    点赞 评论 复制链接分享
  • weixin_39553653 weixin_39553653 2020-12-27 03:56

    your code effectively is a node. It imports rospy.

    点赞 评论 复制链接分享
  • weixin_39761573 weixin_39761573 2020-12-27 03:56

    It is not affected with importing rospy, If I removed import rospy, the code still works effectively. However, it is only affected by importing mavros Also when I run in a terminal rosrun rqt_graph rqt_graph, it doesn't appear as a node.

    点赞 评论 复制链接分享
  • weixin_39553653 weixin_39553653 2020-12-27 03:56
    1. https://github.com/mavlink/mavros/blob/master/mavros/src/mavros/command.py
    2. anonymous node. use console tools.
    点赞 评论 复制链接分享
  • weixin_39761573 weixin_39761573 2020-12-27 03:56

    I checked in the terminal with rosnode list and it just gave me /mavros and /rosout nodes only, no annonymous nodes.

    点赞 评论 复制链接分享