Install microROS Agent

Under Construction

The microROS Agent acts as a (WiFi)communication-channel between the ROS-Humble system and the embedded ESP32 devices controlling turnouts or the Marklin RailBox bridge.

You can install using the following options:

  • Using script:run install_microros_agent.sh script in scripts directory of this repository.

cd ~/railtrack_ws/src/railtrack/scripts
./install_microros_agent.sh
  • Manually: Install microROS

    • Follow only the instructions in the “Installing ROS 2 and the micro-ROS build system “ and “Creating the micro-ROS agent” sections

Add microROS to the environment

echo "source ~/microros_ws/install/setup.bash" >> ~/.bashrc

Note: Execute this command only once. If multiple lines exists in “~/.bashrc” remove all other lines.

Start microROS Agent

ros2 run micro_ros_agent micro_ros_agent udp4 --port 8888

The microROS Agent is the first program you always need to start. You can start it by the command above or alternative by:

  • Using script: run start_micro_ros_agent.sh script in scripts directory of this repository.

cd ~/railtrack_ws/src/railtrack/scripts
./start_micro_ros_agent.sh
  • Install a Linux-service using the install_railtrack_control_service.sh script in the linux_service directory of this repository (note: the micro-ros agent might not be running, abort with ctrl-C).

cd ~/railtrack_ws/src/railtrack/linux_service
./install_railtrack_control_service.sh