[ros-users] "rostopic pub" and Float64MultiArray

Ken Conley kwc at willowgarage.com
Tue Apr 27 16:38:59 UTC 2010


Hi Miguel,

Here's an example below. The multiarray itself I am sending is not
valid as I made up fake dimensions.

$ rosmsg show Float64MultiArray
[std_msgs/Float64MultiArray]:
std_msgs/MultiArrayLayout layout
  std_msgs/MultiArrayDimension[] dim
    string label
    uint32 size
    uint32 stride
  uint32 data_offset
float64[] data

ninja:~ kwc$ rostopic pub f64 std_msgs/Float64MultiArray """
layout:
  dim: [{label: 'x', size: 1234, stride: 1},{label: 'y', size: 1234,
stride: 1} ]
  data_offset: 0
data: [1.0, 2.0, 3.0, 4.0]
"""
publishing and latching message. Press ctrl-C to terminate



On Tue, Apr 27, 2010 at 9:21 AM, Miguel Prada <miguel.register at gmail.com> wrote:
> Hi,
>
> Is there any way I can publish to a topic which expects messages of type Float64MultiArray using 'rostopic pub'?
>
> If there isn't, which would be the best way to achieve something similar for testing purposes? Maybe a simple python publisher node?
>
> Thanks
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>



More information about the ros-users mailing list