
I had a problem with an action client not connecting to the server. I stuck as close to the tutorial as possible. I tested that the server works by using rosrun actionlib axclient.py /robot_skills/pick as proposed here.
Still, the code below would get stuck on "Waiting for result".
#!/usr/bin/env python import sys import rospy import actionlib import geometry_msgs.msg import robot_skills.msg class ExampleClass(object): def __init__(self): self.pick_client = actionlib.SimpleActionClient('/robot_skills/pick', robot_skills.msg.pickAction) def do_pick_action(self, robot_name): goal = robot_skills.msg.pickGoal() rospy.loginfo("Sending empty pick action goal") rospy.loginfo(goal) self.pick_client.send_goal(goal) rospy.loginfo("Waiting for result") self.pick_client.wait_for_result() rospy.loginfo("Getting result") return self.pick_client.get_result() if __name__ == '__main__': rospy.init_node('assembly_example') tutorial = ExampleClass() tutorial.do_pick_action("a_bot") Originally posted by fvd on ROS Answers with karma: 2180 on 2018-08-13
Post score: 0