ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Using actions [closed]

asked 2015-02-09 09:45:01 -0600

pexison gravatar image

Hello, I tried to modify one of those tutorials of actionlib and when i do catkin_make the output is this:

-- Using these message generators: gencpp;genlisp;genpy
-- Generating .msg files for action control/Control /home/robot/Desktop/gamma/src/control/action/Control.action
Traceback (most recent call last):
  File "/opt/ros/hydro/share/actionlib_msgs/cmake/../../../lib/actionlib_msgs/genaction.py", line 136, in <module>
Generating for action Control
    if __name__ == '__main__': main()
  File "/opt/ros/hydro/share/actionlib_msgs/cmake/../../../lib/actionlib_msgs/genaction.py", line 97, in main
    raise ActionSpecException("%s: wrong number of pieces, %d"%(filename,len(pieces)))
__main__.ActionSpecException: /home/robot/Desktop/gamma/src/control/action/Control.action: wrong number of pieces, 6
CMake Error at /opt/ros/hydro/share/catkin/cmake/safe_execute_process.cmake:11 (message):

  execute_process(/home/robot/Desktop/gamma/build/catkin_generated/env_cached.sh
  "/usr/bin/python"
  "/opt/ros/hydro/share/actionlib_msgs/cmake/../../../lib/actionlib_msgs/genaction.py"
  "/home/robot/Desktop/gamma/src/control/action/Control.action" "-o"
  "/home/robot/Desktop/gamma/devel/share/control/msg") returned error code 1
Call Stack (most recent call first):
  /opt/ros/hydro/share/actionlib_msgs/cmake/actionlib_msgs-extras.cmake:67 (safe_execute_process)
  control/CMakeLists.txt:57 (add_action_files)

The action file contains this:

#Twist defined in action
  float64 x_angular
---
  float64 y_angular
--- 
  float64 z_angular
---
  float64 x_linear
--- 
  float64 y_linear
---
  float64 z_linear

What could be happening here?

Thanks beforehand!

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by pexison
close date 2015-02-09 10:48:40.691122

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-02-09 10:24:37 -0600

dornhege gravatar image

Your action file must have exactly 3 sections separated by --- for goal, result and feedback. You have 6 sections.

If you want to include another message type include that type instead of repeating its content, i.e. use geometry_msgs/Twist twist as an entry.

edit flag offensive delete link more

Comments

Sorry, it was a beginner fault

pexison gravatar image pexison  ( 2015-02-09 10:48:32 -0600 )edit

Question Tools

Stats

Asked: 2015-02-09 09:45:01 -0600

Seen: 954 times

Last updated: Feb 09 '15