/ros_pubsub

publisher and subscriber of ROS

Primary LanguageC++

ROS Publisher and Subscriber

For testing ROS(Robot Operating System) workload, the program in this repo is referred to following materials

Execution

  • Running ROS core first

Other ROS processors require to register to core processor, which helps to pass message and manage the other processors.

### commands to run ROS core

$ roscore

ROS core will listen on port 11311 by default.

  • The command format of running ROS processors has following format: rosrun ROS_PACKAGE COMMAND

We may check the installed package by:

$ rospack list-names 
  • Running pubsub demo
  1. run core processor
  2. run sub processor
$ rosrun roscpp_tutorials listener
  1. run pub processor
$ rosrun roscpp_tutorials talker

Run pubsub on Kubernetes

  1. Build container images and push to private registery

  2. Run Kubernetes configuration file (under directory k8s)

Running core_sub.yml first to create core processor and subscriber processor, along with Kubernetes Service for Core processor.

Then, running pub.yml, which creates publisher and its headless service.