aerostack2 / aerostack2/as2_platform_tello

[Jazzy] Redeclaration of parameter

未关闭
#14 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
C++
星标
3
派生
4
平均合并
1 天 16 小时
30 天内合并 PR
3

描述

System: Ubuntu 24.04 on Docker
ROS distro: Jazzy

When running the [project_dji_tello](https://github.com/aerostack2/project_dji_tello/tree/main), the following parameter declaration:
https://github.com/aerostack2/as2_platform_tello/blob/5dfa6a0722ee8a628935bc2d9f10405194007441/src/as2_platform_tello.cpp#L93
causes:

```bash
root@firefly:~/drones_as2_unizar# ros2 launch as2_platform_tello tello_platform.launch.py namespace:=drone016:26:19 [18/18]
_file:=config/tello/config.yaml
[INFO] [launch]: All log files can be found below /root/.ros/log/2025-04-04-16-15-57-886538-firefly-4401
[INFO] [launch]: Default logging verbosity is set to INFO
[WARNING] [launch_ros.actions.node]: Parameter file path is not a file: .
[INFO] [as2_platform_tello_node-1]: process started with pid [4404]
[as2_platform_tello_node-1] [INFO] [1743783358.404750478] [drone0.platform]: Construct with name [platform]
[as2_platform_tello_node-1] [INFO] [1743783358.414147885] [as2_mode]: Control mode: UNSET
[as2_platform_tello_node-1] [INFO] [1743783358.414183790] [as2_mode]: Control mode: HOVER YAW_ANGLE BODY_FLU_FRAME
[as2_platform_tello_node-1] [INFO] [1743783358.414190016] [as2_mode]: Control mode: SPEED YAW_SPEED BODY_FLU_FRAME
[as2_platform_tello_node-1] [INFO] [1743783358.437439262] [drone0.platform]: Connecting to Tello at 192.168.0.116:8889 -> :
8889
[as2_platform_tello_node-1] [INFO] [1743783358.580875361] [drone0.platform]: Tello SDK version: 30
[as2_platform_tello_node-1] [INFO] [1743783358.634713343] [drone0.platform]: Reading Tello State from :8890
[as2_platform_tello_node-1] terminate called after throwing an instance of 'rclcpp::exceptions::ParameterAlreadyDeclaredExc
eption'
[as2_platform_tello_node-1] what(): parameter 'tf_timeout_threshold' has already been declared
[ERROR] [as2_platform_tello_node-1]: process has died [pid 4404, exit code -6, cmd '/root/aerostack2_ws/install/as2_platfor
m_tello/lib/as2_platform_tello/as2_platform_tello_node --ros-args --log-level info --ros-args -r __node:=platform -r __ns:=/drone0 --params-file /tmp/launch_params_n35j2hhe --params-file /tmp/tmpppjo5b3f'].
```

Commenting it fixes the issue and the system works perfectly.

This is due to initializing the `tf_handler`:

https://github.com/aerostack2/as2_platform_tello/blob/5dfa6a0722ee8a628935bc2d9f10405194007441/src/as2_platform_tello.cpp#L60

Before declaring the parameter, so this condition:

https://github.com/aerostack2/aerostack2/blob/10200cd9321efc4c3fde5ad7bde363d22f5c38e5/as2_core/src/utils/tf_utils.cpp#L116

returns false.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。