byu-magicc / roscopter

*Under Development* - A fully-featured multirotor autopilot for ROS
http://scholarsarchive.byu.edu/cgi/viewcontent.cgi?article=2324&context=facpub
52 stars 38 forks source link

addWaypointCallback() takes exactly 1 argument (2 given) #39

Closed Vignesh1230 closed 4 years ago

Vignesh1230 commented 5 years ago

Ive just managed to compile the code, after fixing a few makefile errors. Finally got the system up and running in gazebo, and now im trying to add a waypoint but im getting this error. Any ideas on how to fix this? rosservice call /multirotor/add_waypoint 1 1 1 ERROR: service [/multirotor/add_waypoint] responded with an error: error processing request: addWaypointCallback() takes exactly 1 argument (2 given) This is on the main roscopter_sim side. [ERROR] [1546953220.349159, 0.000000]: Error processing request: addWaypointCallback() takes exactly 1 argument (2 given) ['Traceback (most recent call last):\n', ' File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/impl/tcpros_service.py", line 625, in _handle_request\n response = convert_return_to_response(self.handler(request), self.response_class)\n', 'TypeError: addWaypointCallback() takes exactly 1 argument (2 given)\n']

superjax commented 5 years ago

Sorry this somehow got lost.

I'll be honest, I haven't really exercised the addWaypoint method in a long while (I've generally just flown waypoints out of the ros parameters), but I'm sure that we can fix it.

Can you try

rosservice call /multirotor/add_waypoint [1, 1, 1]
sethmnielsen commented 4 years ago

45 fixes this. It was just missing self as the first argument, since it is a method of the WaypointManager class.