Skip to content

Latest commit

 

History

History
76 lines (54 loc) · 988 Bytes

cliserverpython.md

File metadata and controls

76 lines (54 loc) · 988 Bytes

Client Server Python Implementation

mkdir scripts

Server modification

Open a terminal in the file location and Run

chmod +x server.py

Client modification

Open a terminal in the file location and Run,

chmod +x client.py

CMakeLists.txt file modifications

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

catkin_install_python(PROGRAMS scripts/client.py scripts/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 session3_cliserver server.py

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

source devel/setup.bash
rosrun session3_cliserver client.py