Skip to content

A simple ROS 2 node to convert /goal_pose (PoseStamped) to /goal_point (PointStamped), enabling goal setting in environments without RViz2 (e.g., Docker) using tools like Foxglove.

Notifications You must be signed in to change notification settings

COD-RoboStudio/goal_pose_forwarder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Goal Pose Forwarder

概述

goal_pose_forwarder 是一个简单的 ROS 2 包,用于在没有 RViz2 的环境(例如 Docker 容器)中方便地设置导航目标点。

它订阅一个 geometry_msgs/msg/PoseStamped 类型的 /goal_pose 话题,这种消息可以很方便地通过 Foxglove 或其他命令行工具发布。接收到目标位姿后,该节点会提取其中的位置信息(Point),并将其作为 geometry_msgs/msg/PointStamped 类型的消息发布到 /goal_point 话题上。

这个包的主要目的是为 far_planner 或其他需要 PointStamped 类型目标点的规划器提供输入。

工作流程

/goal_pose (PoseStamped) -> [goal_pose_forwarder] -> /goal_point (PointStamped)

依赖

  • ROS 2
  • geometry_msgs

安装与构建

  1. 将此包放置在您的 ROS 2 工作区的 src 目录下。
  2. 构建软件包:
    colcon build --packages-select goal_pose_forwarder

使用方法

  1. 启动节点:

    ros2 launch goal_pose_forwarder goal_pose_forwarder.launch.py
  2. 发布目标点: 您可以使用 Foxglove 或 ros2 命令行工具来发布 /goal_pose

    使用 Foxglove:

    • 在 Foxglove 中连接到您的 ROS 2 网络。
    • 添加一个 "Publish Pose" 面板。
    • 将话题名称设置为 /goal_pose
    • 在地图上点击并拖动以设置您期望的目标位置和朝向。

    使用 ros2 命令行:

    ros2 topic pub --once /goal_pose geometry_msgs/msg/PoseStamped '{header: {frame_id: "map"}, pose: {position: {x: 1.0, y: 2.0, z: 0.0}, orientation: {w: 1.0}}}'

节点启动后,任何发布到 /goal_pose 的消息都会被自动转换并发布到 /goal_point 话题。

话题

  • 订阅: /goal_pose (geometry_msgs/msg/PoseStamped)
  • 发布: /goal_point (geometry_msgs/msg/PointStamped)

About

A simple ROS 2 node to convert /goal_pose (PoseStamped) to /goal_point (PointStamped), enabling goal setting in environments without RViz2 (e.g., Docker) using tools like Foxglove.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published