rosserial - cannot import [custom messages] package
Hello,
I am having trouble using a custom ROS message type on my Arduino. I believe I have the latest version of ros-fuerte-rosserial
I have written & compiled a custom package called arduino_msgs, which worked since rosmsg show finds it. I have ran rosrun rosserial_client make_library.py to "bind" it to my arduino libraries, and I have received a good ouput.
My arduino node has two subscribers & one publisher. The publisher uses an arduino_msgs message type, and the subscribers are std_msgs. When I run rosrun rosserial_python serial_node.py /dev/ttyACM0, I get the following output (lunarex is the name of my computer..)
lunarex@LunarEx:~/McGill_LunarEx_2013/Arduino$ rosrun rosserial_python serial_node.py /dev/ttyACM0[INFO] [WallTime: 1366251538.465538] ROS Serial Python Node
[INFO] [WallTime: 1366251538.474754] Connected on /dev/ttyACM0 at 57600 baud
[ERROR] [WallTime: 1366251540.605275] Cannot import package : arduino_msgs
[ERROR] [WallTime: 1366251540.607357] sys.path was ['/opt/ros/fuerte/stacks/rosserial/rosserial_msgs/src', '/opt/ros/fuerte/stacks/rosserial/rosserial_python/src', '/opt/ros/fuerte/stacks/rosserial/rosserial_python/nodes', '/opt/ros/fuerte/lib/python2.7/dist-packages', '/home/lunarex/McGill_LunarEx_2013/Arduino', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PIL', '/usr/lib/python2.7/dist-packages/gst-0.10', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.7', '/usr/lib/python2.7/dist-packages/ubuntu-sso-client', '/usr/lib/python2.7/dist-packages/ubuntuone-client', '/usr/lib/python2.7/dist-packages/ubuntuone-installer', '/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol', '/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode']
[ERROR] [WallTime: 1366251540.609387] Failed to parse publisher: 'NoneType' object has no attribute 'msg'
[INFO] [WallTime: 1366251540.619060] Setup Subscriber on ang_speed [std_msgs/Float32]
[INFO] [WallTime: 1366251540.630073] Setup Subscriber on lin_speed [std_msgs/Float32]
[ERROR] [WallTime: 1366251540.633170] Tried to publish before configured, topic id 125
[ERROR] [WallTime: 1366251540.640945] Tried to publish before configured, topic id 125
[ERROR] [WallTime: 1366251540.656522] Tried to publish before configured, topic id 125
[ERROR] [WallTime: 1366251540.674111] Tried to publish before configured, topic id 125
[ERROR] [WallTime: 1366251540.685796] Tried to publish before configured, topic id 125
[ERROR] [WallTime: 1366251540.702021] Tried to publish before configured, topic id 125
..ad infinitum
so the bottom line is that my custom package (arduino_msgs) cannot be imported by rosserial, and therefore I cannot publish to a topic with that message type. Everything else works fine, so I can work around it using std_msgs, but if someone could point me to a solution that would be great.
Thanks! Ernest
---EDIT---
I have acted upon fergs's three suggestions.
1) rosmake arduino_msgs produces this correct output
[ rosmake ] rosmake starting...
[ rosmake ] Packages requested are: ['arduino_msgs']
[ rosmake ] Logging to directory /home/lunarex/.ros/rosmake/rosmake_output20130427-200123
[ rosmake ] Expanded args ['arduino_msgs'] to:
['arduino_msgs']
[rosmake-0] Starting >>> std_msgs [ make ]
[rosmake-0] Finished <<< std_msgs No Makefile in package std_msgs
[rosmake-0] Starting >>> arduino_msgs [ make ]
[rosmake-0] Finished <<< arduino_msgs [PASS] [ 5.27 seconds ]
[ rosmake ] Results:
[ rosmake ] Built 2 packages with 0 ...