Questions tagged [array]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
101 views

How to plot array topics on RQT_plot?

I am working on a project where I need to plot data from ROS2 array topics using rqt_plot. The data I'm dealing with involves multiple array topics, which are published per cycle from another node. ...
Yernar's user avatar
  • 1
0 votes
0 answers
46 views

ROS custom msg to be used in an ESP32 microcontroller using Platformio

I'm trying to publish an array of quaternions to a single topic on ROS noetic. For that I created a new message type following the tutorial: ...
Heisenberg's user avatar
0 votes
1 answer
224 views

Publishing array data with rqt

I'm trying to use the rqt message publisher to publish a message of type std_msgs/msg/Float64MultiArray. I can't figure out how I'm supposed to give the ...
user avatar
0 votes
1 answer
5 views

how does one index array in rospy?

I need the size of a custom array msg type. (The type is geometry_msgs/PoseStamped[] PoseStampedArray.) I need to iterate on the msg if it is not empty and I would very much like to get the last ...
user avatar
0 votes
1 answer
9 views

how can i save rostopic in array?

Hi guys. I need help. I want to make nodes that 'subscribe topic - save in array' and 'read array - publish topic'. (in my case it is geometry_msgs::Pointstamped) But there are no references and ...
user avatar
0 votes
1 answer
54 views

How to get length of array of geometry_msg:Points in service handle?

I'm trying to find the length of an array of geometry_msg:Point passed to a service handle, so I can iterate over each Point, apply a transform and then push onto a response. when I use sizeof(req....
user avatar
0 votes
1 answer
19 views

looping through a custom message in ROS Kinetic

I created a custom message and it has string array(can be called a list) As I need to iterate through the string array, there is no built in dir that helps with it. Whenever I try to run a for loop on ...
user avatar
0 votes
1 answer
396 views

How can we actually use Float32MultiArray to publish 2D array using Python?

Hi, I am frustrated trying to understand the concept of Float32MultiArray. I have been reading the documentations from Float32MultiArray API , MultiArrayLayout and MultiArrayDimesion but I still don't ...
user avatar
0 votes
1 answer
3 views

Length of the tracks array in radar_msgs/RadarTrackArray

Hi, I'm having this programming problem in ROS. I'm looping through the tracks array in radar_msgs/RadarTrackArray message and accessing its values. I'm using for-loop: ...
user avatar
0 votes
1 answer
3 views

[crystal] Is there a limit on the array.resize?

When I try to resize a embedded array only 128 values are printed. After the 128 values, a '...'] is shown. This is when using ros2 topic echo. Is this to be ...
user avatar
0 votes
1 answer
32 views

How to send Array Message from Arduino to ROS Topic?

Hi Buddy, I'm newbie in ROS and i trying to send data from arduino to Ros Topic. I have send string and integer type. But in Array type i have a small problem. This is my source code: ...
user avatar
0 votes
1 answer
1 view

Subscriber to array type overwriting data from different publishers!

Hi, I have been witnessing some bizarre behaviour with my very simple node. I have a custom message that contains uint8[] type (it's 8 elements long). I have a ...
user avatar
0 votes
1 answer
59 views

Subscribing to a Float32MultiArray and printing each value

Hey everyone, I'm trying to do exactly what the title says , subcribe to a Multi Array with Float32 values (7 elements), and print each value for testing purposes. For some reason, what worked with ...
user avatar
0 votes
1 answer
7 views

subscribe field of message array

Hey there, I would like to subscribe a field of a message array. E.g. if my message looks like this: BallStates.msg: BallState[] ball_states BallState.msg: ...
user avatar
0 votes
1 answer
4 views

Hi, i canot publish an array to ros from arduino ide

enter code here ...
user avatar
0 votes
1 answer
132 views

Publish and subscribe array of vector as message

Hi all, I am trying to send an array of vector from one node to another node as a message. The message contains this array and other message fields as well. My cpp file has the following array vector: ...
user avatar
0 votes
1 answer
27 views

Float64[9] covariance array in C++

I am trying to fill in an IMU message, and it requires 3 arrays of Float64's. How can I fill such an array in C++, initializing the first element with value -1 and the other values 0. The ...
user avatar
0 votes
2 answers
66 views

How would I publish a 2D float Array through a ROS message?

I am currently working on a circle detection app. Using OpenCV, I get a std::vector<std::vector<float>> named ...
user avatar
0 votes
1 answer
52 views

How to publish an array of strings?

operation=['addition','subtraction','multiplication','division'] I want to publish each element in the array from one node and subscribe those elements by other node. What should be the proper python ...
user avatar
0 votes
1 answer
7 views

Return array in service in c++

Hi people! I'm starting with ROS and I have a problem implementing a client and server. I used the files created in the tutorials of ROS but I would like to return an array of strings and I don't know ...
user avatar
0 votes
1 answer
15 views

How to publish a 2 dimensional array of known values

Hello, I'm stuck at my program to publish a 2 dimensional array. The array kinda looks like this: int deptharray[4][5] = { {0, 0, 0, 0}, {0, average11, average21, average31, average41}, {0, average12, ...
user avatar
0 votes
1 answer
4 views

2D array as service response

I want to use a service that has a 2D array response this is my .srv file uint32 a --- uint32[][] tree catkin_make error: ...
user avatar
0 votes
1 answer
108 views

Assign C++ Array to ROS Msg Array

How do I assign a C++ array to a ROS message array? In particular, how do I do this for a float64[9] array? Originally posted by atp on ROS Answers with karma: 529 on 2016-04-22 Post score: 1
user avatar
0 votes
1 answer
71 views

rostopic echo of a field of an array in ROS Indigo

Hi, I have an issue trying to display a field of an array in a message in ROS Indigo with the command rostopic echo. I'm trying to display the position of an object detected with the Ork package, ...
user avatar
0 votes
1 answer
35 views

Publishing and Subscribing Vectors

Hi, How can I receive a vector (with unknown length and contains three floats) over Publisher and Subscriber in C++? Originally posted by hsoltani on ROS Answers with karma: 70 on 2015-08-02 Post ...
user avatar
0 votes
2 answers
3 views

publish array velocities in a topic?

Hi Ros users! I have just done a .cpp wich publish velocities in a opic (p3dx/cmd_vel) Here it is: ...
user avatar
0 votes
1 answer
54 views

Append data to vector3[] array - custom message

Hey guys out there, with lovely help of ROSanswers I got into creating and defining custom messages. My aim is to create a custom message which contains of an array of vector3(). I basically got a ...
user avatar
0 votes
1 answer
7 views

Syntax for extracting string array from srv response in C++

I'm trying to call a service and get a response from my ROS package. The specific srv is gazebo_msgs/GetWorldProperties, which is as follows: ...
user avatar
0 votes
1 answer
11 views

Array as response in service

I'm trying to create a service that returns an array of a custom msg. However, when I call this using roservice call /myservice [input params...] I get the following error: ERROR: service [/...
user avatar
0 votes
1 answer
18 views

Push_back doesn't work

hi everyone, i'm writing a node that could save 3 coordinate and then add a point to a pointcloud. i'm trying to use pushback for the array of points in the cloud, this is the code: ...
user avatar
0 votes
1 answer
3 views

rqt_plot for data in DignosticArray message

I have been trying (unsuccessfully) to plot /diagnostics/status[0]/values[0]/value (a stringified floating point number). Is such a topic string supported by rostopic or rqt_plot ? If so, how do I ...
user avatar
0 votes
1 answer
11 views

Error creating array type custom message for ros service in python

Hey, I m trying to create a script that sends a service message to the server. Everything is good on the server side but I'm trying to build the client side using Python, just to get familiar with ...
user avatar
0 votes
1 answer
5 views

How to publish a array msgs with large data size in Arduino?

Dear all, I amtrying to publish a msgs with large data size on Arduino. I have tried both Float32MultiArray and Laserscan msgs. However, when i increase the data_length more than 7, it shows an error ...
user avatar
0 votes
1 answer
1 view

Storing kinect depth data from turtlebot in an array

I'm trying to write a ros node that subscribes to the turtlebot kinect data streams and can retrieve a distance at a specific point in the image (for starters, it will just be the centre centre point) ...
user avatar
0 votes
1 answer
2 views

Extract data from Image.msg

I need to process the data from a webcam (i used USB_CAM Package). Initially I created a listener that from the topic "/usb_cam/image_raw" extrapolates the array uint8 [] data ... but ... ...
user avatar
0 votes
1 answer
140 views

custom message for matrix or 2d array

Hi! I need to publish a matrix as a ROS message and I was looking around for common types of messages to see how 2d arrays were used. I checked on the following links http://ros.org/wiki/std_msgs http:...
user avatar
0 votes
1 answer
1 view

return an array from a function member of a class

I'm using ROS and OpenCV in C++ environment in order to acquire a video (gray-scale) from a ROS node, convert the data through cv_bridge (in order to elaborate it through OpenCV), extract some data ...
user avatar
0 votes
1 answer
52 views

How to rosservice call with arrays

I'm using ROS electric. I have an srv that contains 2 arrays of int32[] rosmake functions correctly and the service is listed. However when I try to call the service I cannot get it to accept the ...
user avatar
0 votes
1 answer
3 views

Visualizing a point cloud previously stored in an array

Hello, I'd like to visualize a point cloud by using rviz. The points' coordinates were previously stored in an array that contains the x-, y- and z-coordinates of each point within a struct data type. ...
user avatar
0 votes
1 answer
7 views

Capturing Kinect Audio

Is it possible to access the audio stream from Kinect's microphone array within ROS? I found a brief reference in the deprecated kinect stack but nothing else. A quick Google search indicates that ...
user avatar
0 votes
1 answer
1 view

ROS Answers SE migration: publish array

hi at all, easy question (or at least i hope so): how can I write a publisher which publishes an float64array? the problem is, i'm quite new to c++ so i don't understand all of the lines in the ...
user avatar
0 votes
3 answers
105 views

How to initialize a UInt8MultiArray message

Not too much info on these (or any of the variants) on the wiki: what is the proper way to initialize these? I've tried: ...
user avatar
0 votes
1 answer
28 views

How to receive and array of floats over a user defined message type?

Example message type : Request : //request feature's 308 variables! float64[308] features Response : //response Contains object type! int64 object_type After compiling with success all of this and ...
user avatar
0 votes
1 answer
2 views

How do I numpy-ize a Service node or a Client node to manage Request or Response containing numpy array?

Hi, I am trying to transmit a numpy array in a response of a service but I have some trouble to convert it in the appropriate type. I saw the numpy_msg tutorials it works fine for messages but I don't ...
user avatar
0 votes
2 answers
7 views

publish an array of images

Hi, I am trying to publish an array of images. Looking at ros wiki I couldn't find something relevant... I am attaching below my code... The publishing of the array should be at the "try" ...
user avatar
0 votes
1 answer
2 views

How to set the dimensions of the initial pose array

The initial pose array is really much bigger than it needs to be. How do I change it's initial dimensions? Originally posted by JediHamster on ROS Answers with karma: 995 on 2011-04-16 Post score: 1 ...
user avatar
0 votes
1 answer
9 views

How to recieve an array over Publisher and Subscriber? (Python)

Examples would be useful. Originally posted by GeniusGeeko on ROS Answers with karma: 299 on 2011-03-17 Post score: 8
user avatar