18

阿木币

0

精华

4 小时

在线时间

应届白菜

Rank: 1

发表于 2022-1-4 12:18:45 2585 浏览 7 回复

请问prometheus项目里自主降落是如何实现位置控制的那

我看了两个相关的launch文件(p450_gps_onboard.launch,p450_outdoor_landing_static_target.launch),都没有启动位置控制的节点,请问识别降落板得到的位姿信息是如何进行位置控制的啊.下面是这两个launch文件启动的ros节点:
cffd5ea763a7d4fffc87f91a1277c9a.jpg 3ebe301aeb3d5a56904dc6e3842f734.jpg




eason已获得悬赏 3 阿木币

最佳答案

在p450_experiment/launch_detection/p450_indoor_landing_static_target.launch下面 如下是目标检测相关 <!-- run the landpad_det.cpp --> <node pkg="prometheus_detection" type="landpad_det" name="land ...

扫一扫浏览分享
回复

使用道具 举报

106

阿木币

1

精华

394 小时

在线时间

技术大V

Rank: 4

发表于 2022-1-4 15:02:11
在p450_experiment/launch_detection/p450_indoor_landing_static_target.launch下面

如下是目标检测相关
        <!-- run the landpad_det.cpp -->
    <node pkg="prometheus_detection" type="landpad_det" name="landpad_det" output="screen">
        <param name="camera_topic" type="string" value="/prometheus/camera/rgb/image_raw" />
        <param name="camera_info" type="string" value="$(find p450_experiment)/config/prometheus_detection_config/camera_param.yaml" />
    </node>

如下是自主降落的节点
<!-- run the autonomous_landing.cpp -->
        <node pkg="prometheus_mission" type="autonomous_landing" name="autonomous_landing" output="screen" launch-prefix="gnome-terminal --">
                <!-- 仿真模式 - 区别在于是否自动切换offboard模式 -->
                <!-- 2021.1.18 真实飞机该参数为false -->
                <param name="sim_mode" value="false" />
                <!-- 悬停模式 - 仅用于观察检测结果 -->
                <!-- 2021.1.18 第一次飞行还是建议先使用悬停,观察检测结果是否正常 -->
                <param name="hold_mode" value="false" />
                <!-- 是否使用降落板绝对高度 -->
                <!-- 2021.1.18 降落板在地面上静止,高度均为0.01m -->
                <param name="use_pad_height" value="true" />
                <param name="pad_height" value="0.01" />
                <!-- 起始点 -->
                <!-- 2021.1.18 起始点尽量低一点,起飞至1m -->
                <param name="start_point_x" value="0.0" />
                <param name="start_point_y" value="0.0" />
                <param name="start_point_z" value="0.8" />
                <!-- 相机安装偏差 -->
                <!-- 2021.1.18 相机偏移量优化 -->
                <param name="camera_offset_x" value="0.17" />
                <param name="camera_offset_y" value="-0.09" />
                <param name="camera_offset_z" value="-0.07" />
                <!-- 追踪控制参数 -->
                <!-- 2021.1.18 飞机离地高度和相机中心相对与二维码中心的直线距离小于等于0.3,触发land指令 -->
                <param name="kpx_land" value="0.4" />
                <param name="kpy_land" value="0.5" />
                <param name="kpz_land" value="0.08" />
                <param name="arm_height_to_ground" value="0.3" />
                <param name="arm_distance_to_pad" value="0.3" />
                <!-- 目标是否移动及其速度 -->
                <!-- 2021.1.18 该launch文件为静态目标降落,无需在此修改 -->
                <param name="moving_target" value="false" />
                <param name="target_vel_x" value="0.0" />
                <param name="target_vel_y" value="0.0" />
        </node>
回复 点赞

使用道具 举报

18

阿木币

0

精华

4 小时

在线时间

应届白菜

Rank: 1

 楼主| 发表于 2022-1-4 15:40:52
eason 发表于 2022-1-4 15:02
在p450_experiment/launch_detection/p450_indoor_landing_static_target.launch下面

如下是目标检测相关

您好,我已经看过这两个launch文件了,我使用的是室外的自主降落文件,我的问题是在自主降落过程中,位置控制是由那一部分来完成的那,在autonomous_landing.cpp文件里,有提到“prometheus_msgs::ControlCommand Command_Now;                               //发送给控制模块 [px4_pos_controller.cpp]的命令”,但是在这两个室外自主降落的launch文件都启动之后,我并没有看到位置控制的节点
回复 点赞

使用道具 举报

106

阿木币

1

精华

394 小时

在线时间

技术大V

Rank: 4

发表于 2022-1-4 18:17:10
首先室外的降落代码不是autonomous_landing.cpp,而是https://github.com/amov-lab/Prom ... landing_outdoor.cpp


下面就是控制节点呀
https://github.com/amov-lab/Prom ... x-container%5D#L316
回复 点赞

使用道具 举报

18

阿木币

0

精华

4 小时

在线时间

应届白菜

Rank: 1

 楼主| 发表于 2022-1-4 21:40:18
eason 发表于 2022-1-4 18:17
首先室外的降落代码不是autonomous_landing.cpp,而是https://github.com/amov-lab/Prometheus/blob/v1.0-s ...

您好,是这样的,我修改了prometheus代码中control部分的px4_pos_controller.cpp文件和pos_controller_cascade_PID.h文件,使用了自己的控制算法。我的目的是验证自己开发的自主降落程序,但是在修改了上述代码文件之后,我通过compile_control.sh文件,编译了控制部分的代码,但是运行自主降落程序之后,看起来和原来没有什么区别,请问这是什么原因那?我在autonomous_landing的代码中看到控制命令是发送至px4_pos_controller.cpp文件中,但是运行时,我通过rqt_graph命令,并没有看到位置控制的节点,请问这是什么原因那
回复 点赞

使用道具 举报

3

阿木币

0

精华

28 小时

在线时间

老司机

Rank: 2

发表于 2022-1-5 09:19:24
你自己不启动controller 节点的话 ,promethues是默认px4 sender节点
回复 点赞

使用道具 举报

18

阿木币

0

精华

4 小时

在线时间

应届白菜

Rank: 1

 楼主| 发表于 2022-1-5 09:58:48
18342370478 发表于 2022-1-5 09:19
你自己不启动controller 节点的话 ,promethues是默认px4 sender节点

那就是要自己修改相应的launch文件,然后启动pos controller节点
回复 点赞

使用道具 举报

106

阿木币

1

精华

394 小时

在线时间

技术大V

Rank: 4

发表于 2022-1-5 22:02:46
xiaoliu 发表于 2022-1-4 21:40
您好,是这样的,我修改了prometheus代码中control部分的px4_pos_controller.cpp文件和pos_controller_ca ...

我觉得你做指点飞行就行了,这样你只关系px4_pos_estimator和px4_sender就行,替换px4_sender就可以指点测试了
回复 点赞

使用道具 举报

返回列表
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表