Just tested it in the Noetic Version of the course and , it didnt guive me that error.
I executed the following:
ardone_action_client.py:
#! /usr/bin/env python
import rospy
import time
import actionlib
from ardrone_as.msg import ArdroneAction, ArdroneGoal, ArdroneResult, ArdroneFeedback
nImage = 1
# definition of the feedback callback. This will be called when feedback
# is received from the action server
# it just prints a message indicating a new message has been received
def feedback_callback(feedback):
global nImage
print('[Feedback] image n.%d received'%nImage)
nImage += 1
# initializes the action client node
rospy.init_node('drone_action_client')
# create the connection to the action server
client = actionlib.SimpleActionClient('/ardrone_action_server', ArdroneAction)
# waits until the action server is up and running
client.wait_for_server()
# creates a goal to send to the action server
goal = ArdroneGoal()
goal.nseconds = 10 # indicates, take pictures along 10 seconds
# sends the goal to the action server, specifying which feedback function
# to call when feedback received
client.send_goal(goal, feedback_cb=feedback_callback)
# Uncomment these lines to test goal preemption:
#time.sleep(3.0)
#client.cancel_goal() # would cancel the goal 3 seconds after starting
# wait until the result is obtained
# you can do other stuff here instead of waiting
# and check for status from time to time
# status = client.get_state()
# check the client API link below for more info
client.wait_for_result()
print('[Result] State: %d'%(client.get_state()))
Hi, thank you for bringing this to our attention. We are working on implementing an axclient for noetic. For now, I’d ask you to skip exercise 7.11. I will come back here as soon as possible and notify you that it’s ready.
Hi, this issue is fixed. Just something to take into account, instead of rosrun actionlib axclient.py /ardrone_action_server, the command is now rosrun actionlib_tools axclient.py /ardrone_action_server
@roalgoal Thanks for the update, it works! Can you update the instructions to reflect that in Section 7.11? (As of Feb. 3, the instructions are not asking for actionlib_tools). Also, can you do a search and replace for “Exercice” → “Exercise”.