Skip to content

Latest commit

 

History

History
76 lines (54 loc) · 1003 Bytes

actionpython.md

File metadata and controls

76 lines (54 loc) · 1003 Bytes

Action Server Client Python Implementation

mkdir scripts

Sever modification

Open a terminal in the file location and Run

chmod +x ac_server.py

Client modification

Open a terminal in the file location and Run,

chmod +x ac_client.py

CMakeLists.txt file modifications

Open session4_action/CMakeLists.txt and add following lines to the bottom of the file.

catkin_install_python(PROGRAMS scripts/ac_client.py scripts/ac_server.py
  DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)

Build the code

Go to root of the workspace

cd ~/ros_workshop/
catkin build

or

catkin_make

Run the code

Open a terminal and run,

roscore

Open a 2nd terminal in the workspace root and run,

source devel/setup.bash
rosrun session4_action ac_server.py

Open a 3rd terminal in the workspace root and run,

source devel/setup.bash
rosrun session4_action ac_client.py