ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Dear aak2166, I used roslibjs for publishing a geometry_msgs/PoseArray and it seems to work This the code used:

var pose = new ROSLIB.Message({
                    position : {
                      x : 0.1,
                      y : 0.2,
                      z : 0.2
                    },
                    orientation : {
                      x : 0.0,
                      y : 0.0,
                      z : 0.0,
                      w : 1.0
                    }

                  });

var pose_array = new ROSLIB.Message({
            poses : [pose, pose]    
              });

var pose_array_topic = new ROSLIB.Topic({
        ros : ros,
        name : '/test_pose_array',
        messageType : 'geometry_msgs/PoseArray'
          });

pose_array_topic.publish(pose_array);

Dear aak2166, I used roslibjs for publishing a geometry_msgs/PoseArray and it seems to work This the code used:

var pose = new ROSLIB.Message({
                    position : {
                      x : 0.1,
                      y : 0.2,
                      z : 0.2
                    },
                    orientation : {
                      x : 0.0,
                      y : 0.0,
                      z : 0.0,
                      w : 1.0
                    }

                  });

var pose_array = new ROSLIB.Message({
            poses : [pose, pose]    
              });

var pose_array_topic = new ROSLIB.Topic({
        ros : ros,
        name : '/test_pose_array',
        messageType : 'geometry_msgs/PoseArray'
          });

pose_array_topic.publish(pose_array);

Dear aak2166, I used roslibjs for publishing a geometry_msgs/PoseArray and it seems to work work

This the code used:

var pose = new ROSLIB.Message({
                    position : {
                      x : 0.1,
                      y : 0.2,
                      z : 0.2
                    },
                    orientation : {
                      x : 0.0,
                      y : 0.0,
                      z : 0.0,
                      w : 1.0
                    }

                  });

var pose_array = new ROSLIB.Message({
            poses : [pose, pose]    
              });

var pose_array_topic = new ROSLIB.Topic({
        ros : ros,
        name : '/test_pose_array',
        messageType : 'geometry_msgs/PoseArray'
          });

pose_array_topic.publish(pose_array);