/move_base_simple/goal PoseStamped 消息已发布,但机器人不移动

问题描述

ROS2 Foxy 问题:

我正在通过 ros2-web-bridge 从网络客户端向 Gazebo 发布 PoseStamped。 发布主题 /move_base_simple/goal,并回显正确的 PoseStamped 消息。

然而,机器人不会移动。

frame_id 是否正确?

    var PoseStamped = new ROSLIB.Message({
                header: {
                  seq: 0,stamp: {
                      sec: 0,nanosec: 100
                  },frame_id: "base_link"     // map //world //tf_prefix+"/"+map_frame;
                },pose: {
                    position: {
                        x: 0.0,y: 0.0,z: 0.0
                    },orientation: {
                        x: 0.0,z: 0.0,w: 1.0
                    }
                }
            });
        var goal = new ROSLIB.Topic({
            ros : ros,name : '/move_base_simple/goal',messageType : 'geometry_msgs/PoseStamped',});

        // Subscribe to a topic.
        goal.subscribe(function(message) {
          console.log(`Received message: ${message}`);
        });
       function pubMessage() {
           goal.publish(PoseStamped);
       };

ROS2 Foxy 是否支持 move_base_simple/goal?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)