Flexbe App fails to process custom state
I'm new to flexbe and am having trouble adding my own state using the app gui. I am launching the App using the following command
roslaunch flexbe_app flexbe_full.launch
The app launches successfully. When I go to the Configuration tab and show the terminal it shows the error
[State parser] Failed to process nht_flexbe_states.get_pose (name 'frame_map' is not defined)
Where the get_pose.py contains the following snipper
#!/usr/bin/env python
import rospy
import tf
from geometry_msgs.msg import PoseStamped
from flexbe_core import EventState, Logger
class GetAgentPose(EventState):
'''
get position of agent in map frame
-- frame_map string name of the map tf frame
-- frame_agent string name of fixed robot base frame
#> pose_agent PoseStamped current location of mobile agent in map frame
<= done calculated transform
<= failed Failed to calculate transform
'''
def __init__(self, frame_map, frame_agent):
super(GetAgentPose, self).__init__(outcomes = ['done', 'failed'],
output_keys = ['pose_agent'])
self.target_frame = frame_map
self.source_frame = frame_agent
I've noticed that the name in the error changes to reflect the variable I have in the line self.target_frame = frame_map
(and not in the __init__ or the docstring). I used the tutorial to create the containing package, and the ExampleState appears as a viable option in the Statemachine editor. The issue persists after running catkin_make and restarting the app.
I'm running melodic on Ubuntu 18.04.4 with Flexbe 2.2.4
I've also noticed the following error in the terminal echo when starting the app, but I'm uncertain if it is related.
[10371:10371:0623/164650.772048:ERROR:component_loader.cc(165)] Failed to parse extension manifest.
(node:10411) [DEP0025] DeprecationWarning: sys is deprecated. Use util instead.
Any pointer on what I'm doing wrong would be appreciated.