CodeBotler utilizes ROS actions to execute generated code on a real robot. robot_interface/src/robot_client_interface.py defines the action clients that CodeBotler uses to call the robot action servers. The action definitions are in robot_interface/src/robot_actions_pkg/action. An example robot action server script is provided in robot_interface/src/robot_server_example.py - the example server simply prints action calls to the terminal, along with the call arguments and the result. You can use this example script as a template to implement the action servers for your robot.
To build the action messages and the CodeBotler client:
- Navigate to the
robot_interface
subdirectory and runcatkin_make
:cd robot_interface catkin_make
- Source the Catkin workspace setup script:
source devel/setup.bash
- Optionally, add the Catkin workspace setup script to your
~/.bashrc
file to automatically source the setup script when opening a new terminal.echo "source $(pwd)/devel/setup.bash" >> ~/.bashrc
The robot-specific action server must be launched before running the deployment interface.
- Launch your robot action server. To launch the example server:
python3 robot_interface/src/robot_server_example.py
- Launch the deployment script on the robot:
python3 codebotler_deploy.py --robot --ip <robot_ip>
- Open
http://<robot_ip>:8080/
in your browser to access the deployment interface.