turtlesim build problem (Hydro) [closed]
I'm going through the ROS/Tutorials/UnderstandingServicesParams tutorial but using turtlesim code I've built myself. Everything was working fine in that tutorial until I got to the step where a new turtle is spawned. Using the command rosservice call spawn 2 2 0.2 ""
from the tutorial produces the following output:
Traceback (most recent call last):
File "/opt/ros/hydro/bin/rosservice", line 35, in <module>
rosservice.rosservicemain()
File "/opt/ros/hydro/lib/python2.7/dist-packages/rosservice/__init__.py", line 746, in rosservicemain
_rosservice_cmd_call(argv)
File "/opt/ros/hydro/lib/python2.7/dist-packages/rosservice/__init__.py", line 599, in _rosservice_cmd_call
service_class = get_service_class_by_name(service_name)
File "/opt/ros/hydro/lib/python2.7/dist-packages/rosservice/__init__.py", line 380, in get_service_class_by_name
service_class = roslib.message.get_service_class(service_type)
File "/opt/ros/hydro/lib/python2.7/dist-packages/roslib/message.py", line 110, in get_service_class
cls = genpy.message.get_service_class(service_type, reload_on_error=reload_on_error)
File "/opt/ros/hydro/lib/python2.7/dist-packages/genpy/message.py", line 605, in get_service_class
cls = _get_message_or_service_class('srv', service_type, reload_on_error=reload_on_error)
File "/opt/ros/hydro/lib/python2.7/dist-packages/genpy/message.py", line 550, in _get_message_or_service_class
pypkg = __import__('%s.%s'%(package, type_str))
SystemError: ../Objects/codeobject.c:64: bad argument to internal function
What is odd about this problem is that if I open a new terminal and not source to my projects' devel (really unfortunate name) folder, thus using the installed binary, the command works fine.
I have been using the built code for the previous tutorials as well. The only problem I've encountered thus far is that the turtle_teleop_key node would return a segmentation fault. I modified the code to display some status messages (thinking I might be able to debug the cause), and when I ran the next build, the problem went away. Editing the file naturally forced catkin to compile the code fresh and fixed it.
I don't know how to go about debugging this problem though: (a) I don't know Python (and the error messages indicate that is where the problem is) (b) I don't understand the error message well enough (c) the files referred to in the error message point to the /opt/ros/hydro install location, which is not part of my project.
(I know that some files are not copied across to the devel folder from the src folder if the make process does not touch them, but not sure about the files in the 'svr' and 'msg' folders. They do not appear in the devel folder structure. Copying them from the 'src' folder didn't fix the problem either. I have found the files made by catkin for each of the languages.)
Could someone please shed some light on where the problem lies so I can figure out what needs to be done.
Cheers, Nap
I retrieved the turtlesim source code from https://github.com/ros/ros_tutorials/tree/hydro-devel/turtlesim
earlier this month.