# Trouble trying to find ActionType for "execute_trajectory" Action Server

Hello, i'm running ROS Kinetic on Ubuntu 16.04 and working with the Panda robot from Franka Emika.

I'm currently trying to send a command to the robot via Python scripting, i.e Action Client.

I can already send commands to the robot (like stopping it) through the command line, like:

\$ rostopic pub -1 /execute_trajectory/cancel actionlib_msgs/GoalID "stamp:
secs: 0
nsecs: 0
id: ''"


And i would like to do the same but with Python, so i tried the following:

import actionlib
import rospy
from actionlib_msgs.msg import GoalID
from franka_control.msg import ErrorRecoveryAction, ErrorRecoveryActionGoal

def stop_robot():
rospy.init_node('panda_STOPP')
client = actionlib.SimpleActionClient('execute_trajectory', GoalID)
client.wait_for_server()
goal = GoalID()
goal.goal_id.stamp.secs = 0
goal.goal_id.stamp.nsecs = 0
goal.goal_id.id = ''
goal.goal = {}
client.send_goal(goal)

if name == '__main__':
stop_robot()


It doesn't work because GoalID is not an action type message. And in order to create the Client we need one Action message. And i find it strange that there is no action message for GoalID because "execute_trajectory" is actually an action server, meaning there should be an action message for it, right? I don't know if understood the concept of Actions wrongly but any help would be welcome!

Thanks!

edit retag close merge delete

Sort by » oldest newest most voted

Are you using MoveIt to control your robot? If so all the messages, services and action types are described here. You'll need the ExecuteTrajectory action to command the arm.

To clarify a goal and a trajectory are different things. A goal is the desired pose of the end effector (and possibly gripper state too) but a trajectory is a matrix of joint angles defining how they change over time that the robot can follow. You can generate a trajectory from an initial robot state and a goal using a motion planning algorithm.

Hope this helps.

more

Hey Pete, yes, i'm using MoveIt to control it, i just didn't realized that actually MoveIt was generating this execute_trajectory. I'm going to try this out and then give you a feedback. Thank you very much for your explanation and answer!

( 2018-11-05 01:33:56 -0500 )edit