How to make custom action?
Console output from compilation:
-- Generating .msg files for action turtlebot3_console_controller/Motor
/home/rozoalex/ros_catkin_ws/src/turtlebot3_console_controller/action/Motor.action
File "/home/rozoalex/ros_catkin_ws/src/turtlebot3_console_controller/action/Motor.action", line 6
float64 angle
^
SyntaxError: invalid syntax
CMake Error at /opt/ros/indigo/share/catkin/cmake/safe_execute_process.cmake:11 (message):
execute_process(/home/rozoalex/ros_catkin_ws/build/catkin_generated/env_cached.sh
"/usr/bin/python"
"/home/rozoalex/ros_catkin_ws/src/turtlebot3_console_controller/action/Motor.action"
"-o"
"/home/rozoalex/ros_catkin_ws/devel/share/turtlebot3_console_controller/msg")
returned error code 1
Call Stack (most recent call first):
/opt/ros/indigo/share/actionlib_msgs/cmake/actionlib_msgs-extras.cmake:67 (safe_execute_process)
turtlebot3_console_controller/CMakeLists.txt:63 (add_action_files)
-- Configuring incomplete, errors occurred!
See also "/home/rozoalex/ros_catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/rozoalex/ros_catkin_ws/build/CMakeFiles/CMakeError.log".
make: *** [cmake_check_build_system] Error 1
Invoking "make cmake_check_build_system" failed
When I tried to make my own action, I got this. It says I had a syntax error, which I dont think there is.
Here is my Motor.action file ->
# This is an action definition file, which has three parts: the goal
# the result, and the feedback.
# Part 1: the goal.
#
# The angle in degree the robot to turn, sent by client main
float64 angle
---
# Part 2: the result, sent by action server unpon completion
#
# How much time used
duration time_elapsed
# How many updates thrown in total
uint32 updates_n
---
# Part 3: the feedback,to be sent periodically by server
#
# The amount of time elapsed from the start
duration time_elapsed
Thanks!
I can't see anything you've posted. Can you edit your question?
@rozoalex: don't post images to show us text.
Copy-paste the content of the files into your question text, select it and press the Preformatted Text button (the one with
101010
on it).Thanks! just edited it
Can you post your
CMakeLists.txt
file? I really can't see what the problem is, your.action
file looks fine to me. Also try to rebuild your project removingbuild
anddevel
directories.