重新将世界零点定义在了场地中心点,将哨兵的出生点改为红方出生点,车的速度改为1.5m/s,实现了哨兵导航到(0,0)点
This commit is contained in:
1 parent
0e4e4c6e18
commit
969763a9df
36 files changed
+983
-646
No files matched your search
+3
-3
@@ -18,10 +18,10 @@
|
||||
|---|---|
|
||||
| `demo.py` | 前进 → 转向 → 再前进,并打印雷达和里程计 |
|
||||
| `drive_demo.py` | 走正方形并生成 SVG 轨迹图(`generated/drive_trajectory.svg`) |
|
||||
| `nav_client.py` | ★ 发 Nav2 目标点。**发之前先读 `/map` 预检**:占据值 ≥65、未知格、净空 <0.5 m(车体半对角 0.422 m)都直接拦下并说明原因,不合格不发。通过后打印位置/重试次数/结果/离目标误差/field 坐标 |
|
||||
| `free_goals.py` | ★ 从 `rmul_2027.yaml` + `.pgm` 算出「从起点连通的安全区」并列出可去目标点(附净空、距离、可直接复制的 `nav_client.py` 命令)。**不需要起 ROS** |
|
||||
| `build/linux/x86_64/release/nav_client` | ★ 发 Nav2 目标点。**发之前先读 `/map` 预检**:占据值 ≥65、未知格、净空 <0.5 m(车体半对角 0.422 m)都直接拦下并说明原因,不合格不发。通过后打印位置/重试次数/结果/离目标误差/field 坐标 |
|
||||
| `free_goals.py` | ★ 从 `rmul_2027.yaml` + `.pgm` 算出「从起点连通的安全区」并列出可去目标点(附净空、距离、可直接复制的 `build/linux/x86_64/release/nav_client` 命令)。**不需要起 ROS** |
|
||||
| `tf_watch.py` | ★ 实时盯 `map→odom` / `odom→base_link` / `map→base_link` 三条 TF 边 + Gazebo 真值 + `/scan2d` 有效率,超过 0.25 m 的跳变会打 ⚠️。**抓定位瞬移专用**:一个窗口开着,另一个窗口发目标 |
|
||||
| ~~`send_goal.py`~~ | ⚠️ **已废弃(空炮)**:往 `/goal_pose` 话题发 PoseStamped,但 Nav2 **没有任何节点订阅它**(`lib/nav2_bt_navigator/bt_navigator` 里根本没有 `goal_pose` 这个字符串)。要发目标请用 `nav_client.py` |
|
||||
| ~~`send_goal.py`~~ | ⚠️ **已废弃(空炮)**:往 `/goal_pose` 话题发 PoseStamped,但 Nav2 **没有任何节点订阅它**(`lib/nav2_bt_navigator/bt_navigator` 里根本没有 `goal_pose` 这个字符串)。要发目标请用 `build/linux/x86_64/release/nav_client` |
|
||||
| `scan_probe.py` | 雷达质量体检:有效束、距离分布、**有没有被车体糊住**。`scan_probe.py [话题]`,默认 `/scan2d` |
|
||||
| `probe_all.py` | 检查 `/clock /odom /scan /tf` 有没有数据 |
|
||||
| `probe_cmd.py` / `probe_cmd2.py` / `cmd_probe_all.py` | 统计各级 `/cmd_vel` 消息数 |
|
||||
|
||||
@@ -98,7 +98,7 @@ if tf_xy('map', 'base_link') is None:
|
||||
print('\n⚠️ 本演示**直接发 /cmd_vel,绕过了整个 Nav2** —— 所以没有避障。')
|
||||
print(' 车撞到东西是预期的:这里要的是「里程计和真实位置不一致」,')
|
||||
print(' 走 Nav2 的话代价地图会把它绕开,就制造不出漂移了。')
|
||||
print(' Nav2 自己的避障要另外验证(用 nav_client.py 发目标)。')
|
||||
print(' Nav2 自己的避障要另外验证(用 build/linux/x86_64/release/nav_client 发目标)。')
|
||||
print()
|
||||
print('odom_scale = %.2f (1.00 = 真实里程计;>1 = 报告的距离偏大)' % SCALE)
|
||||
if abs(SCALE - 1.0) < 1e-6:
|
||||
|
||||
@@ -159,14 +159,15 @@ def main():
|
||||
node.create_subscription(PointCloud2, '/scan/points_filtered',
|
||||
waiter('scan/points_filtered'), SENSOR_QOS)
|
||||
node.create_subscription(LaserScan, '/scan', waiter('scan'), SENSOR_QOS)
|
||||
node.create_subscription(LaserScan, '/scan2d', waiter('scan2d'), SENSOR_QOS)
|
||||
node.create_subscription(Odometry, '/odom', waiter('odom'), 10)
|
||||
node.create_subscription(OccupancyGrid, '/map', waiter('map'), MAP_QOS)
|
||||
|
||||
deadline = time.time() + 8.0
|
||||
while time.time() < deadline and len(seen) < 5:
|
||||
while time.time() < deadline and len(seen) < 6:
|
||||
rclpy.spin_once(node, timeout_sec=0.2)
|
||||
|
||||
for key in ('map', 'odom', 'scan', 'scan/points', 'scan/points_filtered'):
|
||||
for key in ('map', 'odom', 'scan', 'scan/points', 'scan/points_filtered', 'scan2d'):
|
||||
ok = key in seen
|
||||
note = '(latched,订阅端 QoS 必须 TRANSIENT_LOCAL)' if key == 'map' else ''
|
||||
print(' /%-22s %s %s' % (key, '✅ 有数据' if ok else '❌ 没收到', note))
|
||||
@@ -225,8 +226,7 @@ def main():
|
||||
else:
|
||||
gx, gy = truth[0], truth[1]
|
||||
print(' [真值] Gazebo 世界坐标 (%.3f, %.3f)' % (gx, gy))
|
||||
print(' 场地坐标 (map) (%.3f, %.3f)' % (gx, gy))
|
||||
print(' 中心零点 (field) (%.3f, %.3f)' % (gx - 6.0, gy - 4.0))
|
||||
print(' 场地坐标 (map=field) (%.3f, %.3f)' % (gx, gy))
|
||||
if tf_pos is None:
|
||||
print(' [TF] map -> base_link 拿不到,无法比较')
|
||||
else:
|
||||
|
||||
+4
-4
@@ -3,8 +3,8 @@
|
||||
|
||||
用法::
|
||||
|
||||
python3 tools/free_goals.py # 起点默认 (0.9, 4.0) 出生点
|
||||
python3 tools/free_goals.py --from 6.0 4.0 # 换个起点
|
||||
python3 tools/free_goals.py # 起点默认 (-5.0, 3.0) 当前出生点
|
||||
python3 tools/free_goals.py --from 0.0 0.0 # 换个起点(场地中心)
|
||||
python3 tools/free_goals.py --min-clear 0.7 # 要求更大净空
|
||||
python3 tools/free_goals.py --map path/to/x.yaml
|
||||
|
||||
@@ -146,7 +146,7 @@ def main():
|
||||
formatter_class=argparse.RawDescriptionHelpFormatter)
|
||||
ap.add_argument('--map', default=DEFAULT_YAML, help='栅格图 yaml 路径')
|
||||
ap.add_argument('--from', dest='start', nargs=2, type=float,
|
||||
default=[0.9, 4.0], metavar=('X', 'Y'), help='起点 map 坐标')
|
||||
default=[-5.0, 3.0], metavar=('X', 'Y'), help='起点 map 坐标')
|
||||
ap.add_argument('--min-clear', type=float, default=DEFAULT_MIN_CLEAR,
|
||||
help=f'要求的最小净空(米),默认 {DEFAULT_MIN_CLEAR}')
|
||||
ap.add_argument('--grid', type=float, default=0.5,
|
||||
@@ -193,7 +193,7 @@ def main():
|
||||
|
||||
print('\n直接复制就能跑:')
|
||||
for x, y, cl in picked[:6]:
|
||||
print(f' python3 tools/nav_client.py {x:.2f} {y:.2f}')
|
||||
print(f' build/linux/x86_64/release/nav_client {x:.2f} {y:.2f}')
|
||||
|
||||
if args.no_map:
|
||||
return 0
|
||||
|
||||
+17
-14
@@ -3,12 +3,12 @@
|
||||
|
||||
发布可视化 Marker(不改仿真里的任何东西,纯叠加显示):
|
||||
|
||||
① 红色圆柱 —— 用 `map` 帧表达场地中心 (6.0, 4.0)
|
||||
① 红色圆柱 —— 用 `map` 帧表达场地中心 (0, 0)
|
||||
② 绿色球 —— 用 `field` 帧表达同一个点 (0.0, 0.0)
|
||||
两者如果**完全重合**,说明 map→field 这条变换是对的
|
||||
③ 黄色线框 —— 场地内圈 12×8 的边界(`map` 帧 x[0,12] y[0,8])
|
||||
③ 黄色线框 —— 场地内圈 12×8 的边界(`map` 帧 x[-6,6] y[-4,4])
|
||||
④ 蓝色细线 —— 场地中线(crosshair),交点在场地中心
|
||||
⑤ 文字标签 —— "field(0,0) = map(6.0,4.0)"
|
||||
⑤ 文字标签 —— "field(0,0) = map(0,0)"
|
||||
|
||||
用法:
|
||||
|
||||
@@ -29,11 +29,14 @@ from rclpy.node import Node
|
||||
from rclpy.qos import DurabilityPolicy, HistoryPolicy, QoSProfile
|
||||
from visualization_msgs.msg import Marker
|
||||
|
||||
# 场地几何(来自官方 parameters.json:内圈 12×8,西南内角 = (0,0))
|
||||
# 场地几何(内圈 12×8)。世界/地图已整体平移:场地中心 = (0,0),
|
||||
# 内圈范围 x ∈ [-6,6],y ∈ [-4,4]。
|
||||
FIELD_W = 12.0
|
||||
FIELD_H = 8.0
|
||||
CENTER_X = FIELD_W / 2.0 # 6.0
|
||||
CENTER_Y = FIELD_H / 2.0 # 4.0
|
||||
CENTER_X = 0.0 # 场地中心 x
|
||||
CENTER_Y = 0.0 # 场地中心 y
|
||||
X0 = -FIELD_W / 2.0 # -6.0
|
||||
Y0 = -FIELD_H / 2.0 # -4.0
|
||||
|
||||
|
||||
class FieldCenterMarker(Node):
|
||||
@@ -85,8 +88,8 @@ class FieldCenterMarker(Node):
|
||||
line.header.stamp = now
|
||||
line.scale.x = 0.04
|
||||
line.color.r, line.color.g, line.color.b, line.color.a = 1.0, 0.85, 0.1, 1.0
|
||||
for x, y in ((0, 0), (FIELD_W, 0), (FIELD_W, FIELD_H),
|
||||
(0, FIELD_H), (0, 0)):
|
||||
for x, y in ((X0, Y0), (X0 + FIELD_W, Y0), (X0 + FIELD_W, Y0 + FIELD_H),
|
||||
(X0, Y0 + FIELD_H), (X0, Y0)):
|
||||
line.points.append(self._point(x, y))
|
||||
ms.append(line)
|
||||
|
||||
@@ -95,10 +98,10 @@ class FieldCenterMarker(Node):
|
||||
cross.header.stamp = now
|
||||
cross.scale.x = 0.03
|
||||
cross.color.r, cross.color.g, cross.color.b, cross.color.a = 0.2, 0.5, 1.0, 1.0
|
||||
cross.points.append(self._point(CENTER_X, 0.0))
|
||||
cross.points.append(self._point(CENTER_X, FIELD_H))
|
||||
cross.points.append(self._point(0.0, CENTER_Y))
|
||||
cross.points.append(self._point(FIELD_W, CENTER_Y))
|
||||
cross.points.append(self._point(CENTER_X, Y0))
|
||||
cross.points.append(self._point(CENTER_X, Y0 + FIELD_H))
|
||||
cross.points.append(self._point(X0, CENTER_Y))
|
||||
cross.points.append(self._point(X0 + FIELD_W, CENTER_Y))
|
||||
ms.append(cross)
|
||||
|
||||
# ③ 红色圆柱:用 map 帧表达场地中心
|
||||
@@ -125,7 +128,7 @@ class FieldCenterMarker(Node):
|
||||
text.pose.position = self._point(CENTER_X, CENTER_Y, self.z + 0.75)
|
||||
text.scale.z = 0.35
|
||||
text.color.r = text.color.g = text.color.b = text.color.a = 1.0
|
||||
text.text = 'field(0,0) = map(6.0,4.0)'
|
||||
text.text = 'field(0,0) = map(0,0)'
|
||||
ms.append(text)
|
||||
|
||||
for m in ms:
|
||||
@@ -140,7 +143,7 @@ def main():
|
||||
except KeyboardInterrupt:
|
||||
pass
|
||||
except Exception: # noqa: BLE001
|
||||
# 退出竞态(跟 odom_tf.py 同样的问题):context 已经关了就不用报
|
||||
# 退出竞态(跟 odom_tf 同样的问题):context 已经关了就不用报
|
||||
if rclpy.ok():
|
||||
raise
|
||||
finally:
|
||||
|
||||
@@ -1,230 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
"""用 Nav2 的 NavigateToPose 动作发目标,发之前先用栅格图做可达性预检。
|
||||
|
||||
用法::
|
||||
|
||||
python3 tools/nav_client.py <x> <y> [yaw度]
|
||||
python3 tools/nav_client.py 6.0 4.0 # 走到场地中部
|
||||
python3 tools/nav_client.py 6.0 4.0 90 # 到位置后朝向 +90°
|
||||
python3 tools/nav_client.py 3.0 4.0 --force # 明知在障碍里也发(调试用)
|
||||
|
||||
坐标是 map 帧:x∈[0,12],y∈[0,8],出生点 (0.9, 4.0)。
|
||||
想换成「场地中心 = 零点」的直觉坐标:field = (map_x - 6, map_y - 4)。
|
||||
|
||||
为什么要预检:Nav2 的规划器对「目标点落在障碍格里」只会吐一句
|
||||
``Failed to create plan with tolerance of: 0.500000``,看不出原因。
|
||||
这里直接读 /map,把目标点的占据值和净空算出来,不合格就在发之前拦住。
|
||||
"""
|
||||
|
||||
import math
|
||||
import sys
|
||||
import time
|
||||
|
||||
import numpy as np
|
||||
import rclpy
|
||||
from nav2_msgs.action import NavigateToPose
|
||||
from nav_msgs.msg import OccupancyGrid
|
||||
from rclpy.action import ActionClient
|
||||
from rclpy.node import Node
|
||||
from rclpy.parameter import Parameter
|
||||
from rclpy.qos import DurabilityPolicy, QoSProfile, ReliabilityPolicy
|
||||
from tf2_ros import Buffer, TransformListener
|
||||
|
||||
# 车体是 0.65 x 0.54 矩形,半对角 0.422 m;小于这个值必然车身压障碍。
|
||||
HALF_DIAGONAL = 0.422
|
||||
# 低于这个净空就不建议去(膨胀层默认 0.45)。
|
||||
MIN_CLEARANCE = 0.50
|
||||
# 判定「被占据」的阈值,和 rmul_2027.yaml 的 occupied_thresh 对齐。
|
||||
OCCUPIED_THRESHOLD = 65
|
||||
# 净空搜索半径上限(米)。
|
||||
CLEARANCE_SEARCH = 2.0
|
||||
|
||||
|
||||
def parse_args(argv):
|
||||
"""分出位置参数和 --force。"""
|
||||
force = '--force' in argv
|
||||
pos = [a for a in argv if not a.startswith('--')]
|
||||
gx = float(pos[0]) if len(pos) > 0 else 6.0
|
||||
gy = float(pos[1]) if len(pos) > 1 else 4.0
|
||||
yaw_deg = float(pos[2]) if len(pos) > 2 else 0.0
|
||||
return gx, gy, yaw_deg, force
|
||||
|
||||
|
||||
def grid_to_array(grid):
|
||||
"""把 OccupancyGrid 变成 numpy 数组,行 0 = y 最小(和 origin 对齐)。"""
|
||||
info = grid.info
|
||||
arr = np.asarray(grid.data, dtype=np.int8).reshape(info.height, info.width)
|
||||
return arr, info
|
||||
|
||||
|
||||
def world_to_cell(info, x, y):
|
||||
"""世界坐标 -> 栅格下标,越界返回 None。"""
|
||||
c = int(math.floor((x - info.origin.position.x) / info.resolution))
|
||||
r = int(math.floor((y - info.origin.position.y) / info.resolution))
|
||||
if not (0 <= c < info.width and 0 <= r < info.height):
|
||||
return None
|
||||
return r, c
|
||||
|
||||
|
||||
def clearance_at(arr, res, r, c, search=CLEARANCE_SEARCH):
|
||||
"""返回 (r, c) 到最近障碍格的距离(米),超过 search 就返回 search。
|
||||
|
||||
未知格(-1)也算障碍 —— 代价地图开了 track_unknown_space,
|
||||
在未知区里规划同样会失败,按障碍处理更接近实际行为。
|
||||
"""
|
||||
n = max(1, int(search / res))
|
||||
r0, r1 = max(0, r - n), min(arr.shape[0], r + n + 1)
|
||||
c0, c1 = max(0, c - n), min(arr.shape[1], c + n + 1)
|
||||
win = arr[r0:r1, c0:c1]
|
||||
bad = (win >= OCCUPIED_THRESHOLD) | (win < 0)
|
||||
if not bad.any():
|
||||
return search
|
||||
rr, cc = np.nonzero(bad)
|
||||
dist = np.hypot(rr + r0 - r, cc + c0 - c) * res
|
||||
return float(dist.min())
|
||||
|
||||
|
||||
def yaw_to_quaternion(yaw):
|
||||
"""从偏航角(弧度)构造只含 z/w 的四元数。"""
|
||||
return math.sin(yaw / 2.0), math.cos(yaw / 2.0)
|
||||
|
||||
|
||||
def main():
|
||||
"""发一个目标并跟踪到结束。"""
|
||||
gx, gy, yaw_deg, force = parse_args(sys.argv[1:])
|
||||
|
||||
rclpy.init()
|
||||
# 整套栈都是 use_sim_time:=true(Gazebo 时钟),客户端必须一致,
|
||||
# 否则本节点算出的时间戳跟 TF 里的仿真时间对不上。
|
||||
node = Node('nav_client',
|
||||
parameter_overrides=[
|
||||
Parameter('use_sim_time', Parameter.Type.BOOL, True)])
|
||||
tf_buffer = Buffer()
|
||||
TransformListener(tf_buffer, node)
|
||||
|
||||
# /map 是 TRANSIENT_LOCAL 发布的,用默认 QoS 会一条都收不到。
|
||||
map_qos = QoSProfile(depth=1,
|
||||
reliability=ReliabilityPolicy.RELIABLE,
|
||||
durability=DurabilityPolicy.TRANSIENT_LOCAL)
|
||||
holder = {}
|
||||
node.create_subscription(OccupancyGrid, '/map',
|
||||
lambda m: holder.setdefault('m', m), map_qos)
|
||||
|
||||
t0 = time.time()
|
||||
while 'm' not in holder and time.time() - t0 < 15.0:
|
||||
rclpy.spin_once(node, timeout_sec=0.2)
|
||||
|
||||
if 'm' not in holder:
|
||||
print('⚠️ 15 秒内没收到 /map,跳过预检直接发目标')
|
||||
arr = info = None
|
||||
else:
|
||||
arr, info = grid_to_array(holder['m'])
|
||||
print(f'地图 {info.width}x{info.height} @ {info.resolution} m/px '
|
||||
f'origin=({info.origin.position.x:.2f}, {info.origin.position.y:.2f})')
|
||||
|
||||
cell = world_to_cell(info, gx, gy)
|
||||
if cell is None:
|
||||
print(f'❌ 目标 ({gx:.2f}, {gy:.2f}) 在地图范围外,发出去也是 ABORTED')
|
||||
node.destroy_node()
|
||||
rclpy.shutdown()
|
||||
return 1
|
||||
|
||||
r, c = cell
|
||||
value = int(arr[r, c])
|
||||
clr = clearance_at(arr, info.resolution, r, c)
|
||||
state = ('障碍' if value >= OCCUPIED_THRESHOLD
|
||||
else '未知' if value < 0 else '空闲')
|
||||
print(f'目标 ({gx:.2f}, {gy:.2f}) -> 栅格 ({c}, {r}) '
|
||||
f'占据值 {value:4d} ({state}) 净空 {clr:.2f} m')
|
||||
|
||||
if state != '空闲' or clr < MIN_CLEARANCE:
|
||||
print()
|
||||
print(f'❌ 这个点不适合当目标(净空需 >= {MIN_CLEARANCE:.2f} m):')
|
||||
if state == '障碍':
|
||||
print(' 点落在障碍格里 —— 规划器必然报 '
|
||||
'"Failed to create plan with tolerance",换一个点。')
|
||||
elif state == '未知':
|
||||
print(' 点落在未知区域 —— 代价地图开了 track_unknown_space,同样规划不出来。')
|
||||
else:
|
||||
print(f' 净空只有 {clr:.2f} m,车身半对角就有 {HALF_DIAGONAL:.2f} m,'
|
||||
'挤进去会卡死。')
|
||||
print(' 想找安全点:python3 tools/free_goals.py')
|
||||
if not force:
|
||||
print(' (确实要发就加 --force)')
|
||||
node.destroy_node()
|
||||
rclpy.shutdown()
|
||||
return 2
|
||||
print(' --force 已指定,继续发送')
|
||||
|
||||
client = ActionClient(node, NavigateToPose, 'navigate_to_pose')
|
||||
print('等待 navigate_to_pose 动作服务器...')
|
||||
if not client.wait_for_server(timeout_sec=30):
|
||||
print('❌ 动作服务器不可用(Nav2 没起来,或 bt_navigator 没 ACTIVE)')
|
||||
node.destroy_node()
|
||||
rclpy.shutdown()
|
||||
return 1
|
||||
print('✅ 动作服务器可用')
|
||||
|
||||
goal = NavigateToPose.Goal()
|
||||
goal.pose.header.frame_id = 'map'
|
||||
goal.pose.header.stamp = node.get_clock().now().to_msg()
|
||||
goal.pose.pose.position.x = gx
|
||||
goal.pose.pose.position.y = gy
|
||||
qz, qw = yaw_to_quaternion(math.radians(yaw_deg))
|
||||
goal.pose.pose.orientation.z = qz
|
||||
goal.pose.pose.orientation.w = qw
|
||||
|
||||
# 注意:不要打印 feedback.distance_remaining。
|
||||
# Nav2 1.5 的 NavigateToPose 不会填这个字段,永远是 0.00,
|
||||
# 打了只会刷屏骗人。用 current_pose 和 number_of_recoveries。
|
||||
state = {'last': 0.0}
|
||||
|
||||
def on_feedback(fb):
|
||||
now = time.time()
|
||||
if now - state['last'] < 1.0:
|
||||
return
|
||||
state['last'] = now
|
||||
f = fb.feedback
|
||||
p = f.current_pose.pose.position
|
||||
print(f' 位置 ({p.x:5.2f}, {p.y:5.2f}) '
|
||||
f'重试 {int(getattr(f, "number_of_recoveries", 0))}')
|
||||
|
||||
sent = client.send_goal_async(goal, feedback_callback=on_feedback)
|
||||
rclpy.spin_until_future_complete(node, sent, timeout_sec=15)
|
||||
handle = sent.result()
|
||||
if handle is None or not handle.accepted:
|
||||
print('❌ 目标被拒绝')
|
||||
node.destroy_node()
|
||||
rclpy.shutdown()
|
||||
return 1
|
||||
print('✅ 目标已接受,等待结果...')
|
||||
|
||||
res = handle.get_result_async()
|
||||
t0 = time.time()
|
||||
while not res.done() and time.time() - t0 < 180:
|
||||
rclpy.spin_once(node, timeout_sec=0.2)
|
||||
|
||||
names = {4: '✅ SUCCEEDED', 5: '❌ CANCELED', 6: '❌ ABORTED'}
|
||||
if res.done():
|
||||
status = res.result().status
|
||||
print(f'结果: {names.get(status, status)}')
|
||||
else:
|
||||
print('超时未完成(180 s)')
|
||||
|
||||
try:
|
||||
tr = tf_buffer.lookup_transform('map', 'base_link', rclpy.time.Time())
|
||||
p = tr.transform.translation
|
||||
err = math.hypot(p.x - gx, p.y - gy)
|
||||
print(f'TF map->base_link: ({p.x:.2f}, {p.y:.2f}) '
|
||||
f'离目标 {err:.2f} m '
|
||||
f'field 坐标 ({p.x - 6.0:.2f}, {p.y - 4.0:.2f})')
|
||||
except Exception as exc: # noqa: BLE001
|
||||
print(f'⚠️ 查不到 TF map->base_link: {exc}')
|
||||
|
||||
node.destroy_node()
|
||||
rclpy.shutdown()
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main())
|
||||
Reference in new issue
Block a user