Provides a standardized interface for interfacing with preemptable tasks. Examples of this include moving the base to a target location, performing a laser scan and returning the resulting point cloud, detecting the handle of a door, etc.
> python3
> import action_client
> action_client.GoalStatus.to_string(0)
'_has_header' # THE RESULT
I got the "_has_header" as the result instead of "PENDING"
So, the suggestion might be putting the condition of the dict 's key not to start with an underscore ("_") would solve this problem and get the CONSTANT "PENDING" as the key in string type (that we're asking for)
while I've been working with custom action client I found that in function to_string (in "action_client.py")
https://github.com/ros/actionlib/blob/noetic-devel/actionlib/src/actionlib/action_client.py#L64
to be used in this definition in line 92
If I run the following code with python3,
I got the "_has_header" as the result instead of "PENDING"
So, the suggestion might be putting the condition of the dict 's key not to start with an underscore ("_") would solve this problem and get the CONSTANT "PENDING" as the key in string type (that we're asking for)
ROS1 Noetic Ubuntu 20.04