Posts ROS Launcher
Post
Cancel

ROS Launcher

ROS Launcher

1. Host

  • Make launch dir
1
2
3
cd {Workspace dir}/src/{Package name}
mkdir launch
cd launch
  • Make package.launch file
1
2
3
4
5
6
7
8
vi {package}.launch

<?xml version="1.0" encoding="UTF-8"?>
<launch>
  <machine name="machine name" address="machine ip address" user = "machine user name" password = "paswd" env-loader="machine working dir/env.sh"/> 
  <node machine="machine name" name="package name" pkg="package name" type="package name" output="log"/>
  <node pkg="local package name" name="local package name" type="local package name" output="screen"> </node>
</launch>

2. Client

1
2
3
4
5
6
7
8
9
10
cd {Workspace dir}

vi env.sh

#!/bin/bash
source /opt/ros/melodic/setup.bash
source {Workspace absolute path}/devel/setup.bash
export ROS_HOSTNAME={Client IP}
export ROS_HOME={Workspace absolute path}
exec "$@"

3. roslaunched machine

1
ssh -oHostKeyAlgorithms='ssh-rsa' client@192.168.0.56
This post is licensed under CC BY 4.0 by the author.