GitHub basic tutorial
  • Introduction
  • Khởi động hệ thống Ground station computer - Companion computer (Odroid) - Pixhawk
  • Tao 1 private Folder tu public Folder
  • Tạo folder dev PX4 code
  • PX4 modification
  • MAVROS modification
  • Tạo node I3S_receiver
  • Kết nối đọc dữ liệu trong Pixhawk
  • Terminal Linux Ubuntu
  • Kết nối ROS hai máy tính
  • Build ros package in Odroid
  • Pressure sensor
  • Kết nối camera oCAM trên ROS
  • Cài đặt và sử dụng Matlab 2017b trên Linux Ubuntu
  • Một vài vấn đề trên Windows 7
  • Terminator
  • Upload compiled firmware of Pixhawk from odroid
  • Kết nối internet và Ethernet với Odroid (qua Switch) và 1 card mạng kết nối internet
  • IMU, Camera, Pixhawk connection to odroid
  • Kết nối ssh
  • Tham khao code homography cua Ninad
  • Matlab_2017b_problems
  • Eigen library - Mathematical toolbox for C++
  • Kinh nghiệm chuẩn bị presentation
  • Tap lenh lam viec voi Pixhawk px4
  • Offboard mode in PX4
  • P51 Lenovo, trackpad and trackpoint
  • P51 Lenov, Install Quadro M2200 graphic card
  • Gilab
  • Tao 1 private Folder tu public Folder
  • Ubuntu tips: show desktop by pressing Super + D
  • Install eclipse
  • Windows error
  • How to update Sublime Text 3 in ubuntu 16.04
  • PX4 Pixhawk hardfault
  • Install CUDA for computer with NVIDIA graphic card
  • Install openCV after installing CUDA
  • Meld - tool for file or folder comparison
  • GIT - move a full git repository from one remote sever to another one
  • Jetson Nano Installation
  • Working in Jetson Nano
  • Backup and Restore micro sd card
Powered by GitBook
On this page
  • MỞ CÁC ỨNG DỤNG NHƯ GEDIT, CUTECOM, RQT_GRAPH TRÊN REMOTE COMPUTER
  • MAVROS
  • imu_pub
  • DÙNG ỨNG DỤNG ROSTOPIC ECHO ĐỌC DỮ LIỆU IMU
  • DÙNG ỨNG DỤNG ROSTOPIC ECHO LƯU DỮ LIỆU IMU
  • DÙNG ỨNG DỤNG RQT_GRAPH
  • COPY DỮ LIỆU GIỮA 2 COMPUTER KHI KẾT NỐI SSH
  • COPY FOLDER TỪ 1 COMPUTẺR TỚI COMPUTER KHÁC KHI KẾT NỐI SSH

Was this helpful?

Kết nối ROS hai máy tính

PreviousTerminal Linux UbuntuNextBuild ros package in Odroid

Last updated 5 years ago

Was this helpful?

KẾT NỐI ROS cho hai máy tính

Gỉa sử có 2 máy tính:

Máy 1: ground station tên là nguyen3620

ip là 134.59.129.159,

Máy 2: odroid

ip là 134.59.129.151

  • kiểm tra thiết lập tên và ip address: more /etc/hosts

  • edit với: sudo /etc/hosts, cần thiết lập cho may ground station và máy odroid

127.0.0.1 localhost

134.59.129.159 nguyen3620

134.59.133.151 odroid

.....

  • mở 1 terminal mới, trên máy ground station, đặt

export ROS_MASTER_URI=

  • mở 1 terminal mới, trên máy odroid, đặt

export ROS_MASTER_URI=

  • check với lệnh

echo $ROS_MASTER_URI

Một số thông tin khác có thể cần check lại

echo $ROS_IP

echo $ROS_HOST_NAME

MỞ CÁC ỨNG DỤNG NHƯ GEDIT, CUTECOM, RQT_GRAPH TRÊN REMOTE COMPUTER

Từ máy ground station, mở 1 terminal, type

ssh odroid@134.59.129.151 -Y

(Hoặc ssh odroid@134.59.129.151 -X , for untrusted client??)

Nếu có warning:

Gtk
-
Message
:
Failed
 to load module 
"canberra-gtk-module"
sudo apt
-
get install libcanberra
-
gtk
*

MAVROS

imu_pub

Publish IMU state

Published Topics

  • Imu data, orientation computed by FCU

  • Raw IMU data without orientation

  • FCU compass data

  • Temperature reported by FCU (usually from barometer)

  • Air pressure.

DÙNG ỨNG DỤNG ROSTOPIC ECHO ĐỌC DỮ LIỆU IMU

rostopic echo /mavros/imu/data_raw

hoặc

rostopic echo /mavros/imu/data

Có kiểu sensor_msgs/Imu.msg

Trong đó angular_velocity có kiểu geometry_msgs/Vector3

Và Vector3 có 3 thành phần x, y, z

Có thể tra cứu thông tin trực tiếp trên ROS, dùng rosmsg show sensor_msgs/Imu

Do đó, ví dụ, muốn hiển thị thành phần x của angularvelocity trên rqt_graph , cần chọn

/mavros/imu/data/angular_velocity/x

DÙNG ỨNG DỤNG ROSTOPIC ECHO LƯU DỮ LIỆU IMU

Giả sử cần lưu dữ liệu trong home/android vào 1 file có tên imu14sept2017.txt

rostopic echo /mavros/imu/data >imu14sept2017.txt

DÙNG ỨNG DỤNG RQT_GRAPH

rosrun rqt_graph rqt_graph

rồi ví dụ chọn trên cửa sổ bên trên góc trái /mavros/imu/data/angular_velocity/x

COPY DỮ LIỆU GIỮA 2 COMPUTER KHI KẾT NỐI SSH

Syntax:

scp  < source > < destination >

To copy a file from B to A while logged into B:

scp /path/to/file username@a:/path/to/destination

To copy a file from B to A while logged into A:

scp username@b:/path/to/file /path/to/destination

Vi du

scp imu_data.txt nguyen@134.59.129.159:/home/nguyen

scp -r odroid@odroid:/home/odroid/catkin_ws/src/i3s_img_proc /home/lhnguyen/catkin_ws/src

COPY FOLDER TỪ 1 COMPUTẺR TỚI COMPUTER KHÁC KHI KẾT NỐI SSH

ou can use secure copy (scp) with the recursive option (-r):

scp -r /path/to/local/dir user@remotehost:/path/to/remote/dir

Alternatively, I recommend rsync because you can resume transfers if the connection breaks, and it intelligently transfers only the differences between files:

rsync -avz -e 'ssh' /path/to/local/dir user@remotehost:/path/to/remote/dir

Note that in both cases you should be careful of trailing slashes: moving/path/to/local/dirtoremotehost:/path/to/remote/dir/results in/path/to/remote/dir/dir

~imu/data ( )

~imu/data_raw ( )

~imu/mag ( )

~imu/temperature ()

~imu/atm_pressure ()

http://134.59.129.159:11311
http://nguyen3620:11311
http://wiki.ros.org/mavros
sensor_msgs/Imu
sensor_msgs/Imu
sensor_msgs/MagneticField
sensor_msgs/Temperature
sensor_msgs/FluidPressure