ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
There is an inconsistency in your question. You first say that your messages are int_list_1d.msg and int_list_2d.msg but the you create an int_array2d-message.
msg_list = int_list_2d()
msg_lists.data <- this is a list of int_list_1d-messages and not a list of int32-lists.
So you'd rather have to go for
msg_list = int_list_2d()
msg_list.data.append(int_list_1d(data=[1,2,3])
msg_list.data.append(int_list_1d(data=[1,2])
"despite the fact that the catkin_make is completed without errors"
Well, python is a language without strict data types, so it's no big surprise that you find type errors at runtime. If you want to find problems like this earlier, use something like C++
2 | No.2 Revision |
There is an inconsistency in your question. You first say that your messages are int_list_1d.msg and int_list_2d.msg but the then you create an int_array2d-message.
msg_list = int_list_2d()
msg_lists.data <- this is a list of int_list_1d-messages and not a list of int32-lists.
So you'd rather have to go for
msg_list = int_list_2d()
msg_list.data.append(int_list_1d(data=[1,2,3])
msg_list.data.append(int_list_1d(data=[1,2])
"despite the fact that the catkin_make is completed without errors"
Well, python is a language without strict data types, so it's no big surprise that you find type errors at runtime. If you want to find problems like this earlier, use something like C++
3 | No.3 Revision |
There is an inconsistency in your question. You first say that your messages are int_list_1d.msg and int_list_2d.msg but then you create an int_array2d-message.
msg_list = int_list_2d()
msg_lists.data <- this is a list of int_list_1d-messages and not a list of int32-lists.
So you'd rather have to go for
msg_list = int_list_2d()
msg_list.data.append(int_list_1d(data=[1,2,3])
msg_list.data.append(int_list_1d(data=[1,2])
"despite the fact that the catkin_make catkin_make
is completed without errors"
Well, python is a language without strict data types, so it's no big surprise that you find type errors at runtime. If you want to find problems like this earlier, use something like C++