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

dimaluigi's profile - activity

2020-05-04 06:20:18 -0500 received badge  Famous Question (source)
2020-01-17 05:52:18 -0500 received badge  Famous Question (source)
2020-01-17 05:52:18 -0500 received badge  Notable Question (source)
2019-11-25 13:27:19 -0500 received badge  Famous Question (source)
2019-10-01 21:17:32 -0500 received badge  Notable Question (source)
2019-10-01 21:17:32 -0500 received badge  Popular Question (source)
2019-09-04 07:58:35 -0500 received badge  Popular Question (source)
2019-09-04 05:48:05 -0500 commented question variable size array of uint8 as msg field has strange values

yes I've already done it. As I said it is strange that, after setting the array length and after filling the array (via

2019-09-03 17:26:17 -0500 commented answer variable size array of uint8 as msg field has strange values

This thing dosen't compute for me..when i try to print the data type of the uint8[] array in the python script it return

2019-09-03 14:48:23 -0500 commented answer variable size array of uint8 as msg field has strange values

Yes I've just checked that: it goes fine until it reach 127, then it start to go backwards from -127 to 0 and it starts

2019-09-03 07:19:17 -0500 received badge  Popular Question (source)
2019-09-03 07:19:17 -0500 received badge  Notable Question (source)
2019-09-03 05:59:58 -0500 asked a question variable size array of uint8 as msg field has strange values

variable size array of uint8 as msg field has strange values Hi everybody, i'm using MKR1300 arduino board and rosserial

2019-07-18 03:23:41 -0500 asked a question Lost sync with device.. restarting

Lost sync with device.. restarting Hi everybody i'm facing some problems using rosserial: i'm using an MKR WAN 1300 that

2019-07-18 03:00:15 -0500 commented answer uint8[] field in message definition is empty when i echo the topic.

Thank you so much.The #q203529 is what i needed. The problem was the value_length fiedl that is not part of the actual d

2019-07-18 02:42:57 -0500 marked best answer uint8[] field in message definition is empty when i echo the topic.

Hi everybody i'm currently using an arduino board (MKR WAN 1300) as a ROS node, In the arduino sketch i'm using a custom message type named "RosInfo" and i want him to publish this type of msg to a topic named "/fromarduino".The message definition of RosInfo is the following;

uint32 id   
uint8 lenght
uint8[] value
uint64 timestamp

the problem is that: all the fields seems to work fine but the value field is empty when i try to echo the topic in the command line:


id: 21
lenght: 2
value: []
timestamp: 1562351536
---
id: 20
lenght: 2
value: []
timestamp: 1562351536
---

In the arduino sketch i'm filling the RosInfo obj this way

  ros_pkt.id = buff_toROS[tailR].id;
  ros_pkt.timestamp = buff_toROS[tailR].timestamp;
  ros_pkt.lenght = buff_toROS[tailR].len;

  int i=0;

  for(i=0; i<=ros_pkt.lenght; i++){
    ros_pkt.value[i]= buff_toROS[tailR].value[i];
  }

  fromarduino.publish(ros_pkt);

buff_toROS is an array that i'm using like a circulare queue:

typedef struct raw_data{
   unsigned char value[8];
   unsigned int id;
   unsigned char len;
   unsigned long timestamp;
} raw_data;

unsigned char headR = 0;
unsigned char tailR = 0;
unsigned int countR = 0;
raw_data buff_toROS[10];

I literally tried as many methods as possible to fill the ros_pkt,value but no one seems to be releted to the the fact that it is empty. Hope that someone could help me. I apologize in advance if I have not asked the question correctly but it is my first on this forum. Thank you all.

2019-07-18 02:42:57 -0500 received badge  Scholar (source)
2019-07-05 15:31:06 -0500 asked a question uint8[] field in message definition is empty when i echo the topic.

uint8[] field in message definition is empty when i echo the topic. Hi everybody i'm currently using an arduino board (M