Python cannot import geometrical Point array
I am trying to publish an array of geometrical Points (each point having x,y,z) from a python script. I am using ros melodic, ubuntu 18.04 and python 2.7.17
Here is my msg file in the msg folder of the package.:
-------mymesg.msg ---------
geometry_msgs/Point[] points
---------------------------
I used message_generation and message_runtime in CMakeLists.txt and package.xml, then did catkin_make to compile the messages. It verifies generation of message.
$ rosmsg show mypkg/mymesg.msg
geometry_msgs/Point[] points
float64 x
float64 y
float64 z
Now I try to run the script for publishing. The imports in my script are:
from std_msgs.msg import Float64MultiArray
from geometry_msgs.msg import Point
from mypkg.msg import points #line no 8 in my script
............
When I run the script. I get following error.
----------- error -------
Traceback (most recent call last):
File "pub1.py", line 8, in <module>
from mypkg.msg import points
ImportError: cannot import name points
------------------------
What is it that I am doing wrong that it is not importing the array.
Thanks mike. I can see my error now. I stand corrected