当前位置:网站首页>ROS learning: remote start ROS node
ROS learning: remote start ROS node
2020-11-07 20:56:42 【Coxhuang】
List of articles
- Remote start ROS node
- #1 Environmental Science
- #2 demand
- #3 Verify the prerequisites
- #3.1 Verify password free login
- #3.2 Verify the stand-alone ros Publish subscribe
- #4 Start
- #4.1 To configure
- #4.1.1 pc-master
- #4.1.2 pc-slave2
- #4.2 Local host script
- #4.3 start-up
- #4.1 To configure
- #5 Report errors
- #5.1 not found in known_hosts
- #5.2 TypeError: 'NoneType' object is not callable
Remote start ROS node
#1 Environmental Science
Ubuntu 16.04
Machine configuration :
pc-master 192.168.3.230 Local pc-slave2 192.168.3.232 long-range
Prerequisite :
1. It can be realized on two machines ROS Publish and subscribe
2. Two machines can log in without password
#2 demand
- in application , Different functions will be put on different servers
- You need to subscribe to topic
#3 Verify the prerequisites
#3.1 Verify password free login
The two servers can log in to each other without password
Specific password free login tutorial : https://blog.csdn.net/Coxhuang/article/details/106971890
#3.2 Verify the stand-alone ros Publish subscribe
Here we use pc-slave2 Server, for example ( Because the remote startup is also pc-slave2 Nodes on )
talker :
listener :
#4 Start
** Next , We will be having pc-master Start the remote server on the server area pc-slave2 Of talker node **
#4.1 To configure
#4.1.1 pc-master
sudo vim /etc/hosts
stay /etc/hosts Add something to the file :
192.168.3.230 pc-master 192.168.3.232 pc-slave2
sudo vim ~/.bashrc
stay ~/.bashrc Add something to :
export ROS_IP="192.168.3.230" export ROS_HOSTNAME=pc-master export ROS_MASTER_URI=http://pc-master:11311 export ROSLAUNCH_SSH_UNKNOWN=1
#4.1.2 pc-slave2
sudo vim /etc/hosts
stay /etc/hosts Add something to the file :
192.168.3.230 pc-master 192.168.3.232 pc-slave2
sudo vim ~/.bashrc
stay ~/.bashrc Add something to :
export ROS_HOSTNAME=pc-slave2 export ROS_MASTER_URI=http://pc-master:11311 export ROSLAUNCH_SSH_UNKNOWN=1
sudo vim /opt/ros/kinetic/trunk_evn.sh
newly added trunk_evn.sh file
#!/bin/sh export ROS_IP=192.168.3.232 export ROS_HOSTNAME=pc-slave2 . /home/trunk/work/test/testworkspace/devel/setup.sh exec "[email protected]"
sudo chmod 777 trunk_evn.sh
#4.2 Local host script
In the local pc-master Of package Written in launch Script
vim /home/trunk/work/test/testworkspace/src/testpackage/launch/test.launch
<launch> <machine name="pc-slave2" address="192.168.3.232" user="trunk" env-loader="/opt/ros/kinetic/trunk_evn.sh"></machine> <node machine="pc-slave2" name="talker" pkg="testpackage" type="talker.py" output="screen" ></node> </launch>
#4.3 start-up
roslaunch testpackage test.launch
#5 Report errors
#5.1 not found in known_hosts
... logging to /home/trunk/.ros/log/84cf4482-b84f-11ea-9d63-000c297ff566/roslaunch-pc-master-3868.log Checking log directory for disk usage. This may take awhile. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB. started roslaunch server http://pc-master:32881/ remote[192.168.3.232-0] starting roslaunch remote[192.168.3.232-0]: creating ssh connection to 192.168.3.232:22, user[trunk] /usr/lib/python2.7/dist-packages/Crypto/Cipher/blockalgo.py:141: FutureWarning: CTR mode needs counter parameter, not IV self._cipher = factory.new(key, *args, **kwargs) remote[192.168.3.232-0]: failed to launch on pc-slave2: Unable to establish ssh connection to [[email protected]:22]: Server u'192.168.3.232' not found in known_hosts
Solutions :
- Log
According to the log error prompt to modify python Bottom source , There is no effect , The log shows , ros It's still running on python2.7 On , Try to ros Running on the Python3 On
- Default the system to Python Replace with Python3
sudo rm -rf /usr/bin/python sudo ln -s /usr/bin/python3 /usr/bin/python
2. install ros The basic software package for compiling
sudo apt-get install python3-rosdep python3-rosinstall-generator python3-wstool python3-rosinstall build-essential sudo pip3 install catkin_pkg
3. Installation package depends on
rosdep install --from-paths src --ignore-src --rosdistro kinetic -y sudo apt-get install libtbb-dev python3-pyqt5 sudo pip3 install empy numpy defusedxml netifaces # Repair 16.04 libboost_python3 Problems that can't be found sudo ln -s /usr/lib/x86_64-linux-gnu/libboost_python-py35.so /usr/lib/x86_64-linux-gnu/libboost_python3.so
4. Perfect solution
#5.2 TypeError: ‘NoneType’ object is not callable
modify Python The underlying code
Participation of this paper Tencent cloud media sharing plan , You are welcome to join us , share .
版权声明
本文为[Coxhuang]所创,转载请带上原文链接,感谢
边栏推荐
- C++ 数字、string和char*的转换
- C++学习——centos7上部署C++开发环境
- C++学习——一步步学会写Makefile
- C++学习——临时对象的产生与优化
- C++学习——对象的引用的用法
- C++编程经验(6):使用C++风格的类型转换
- Won the CKA + CKS certificate with the highest gold content in kubernetes in 31 days!
- C + + number, string and char * conversion
- C + + Learning -- capacity() and resize() in C + +
- C + + Learning -- about code performance optimization
猜你喜欢
-
C + + programming experience (6): using C + + style type conversion
-
Latest party and government work report ppt - Park ppt
-
在线身份证号码提取生日工具
-
Online ID number extraction birthday tool
-
️野指针?悬空指针?️ 一文带你搞懂!
-
Field pointer? Dangling pointer? This article will help you understand!
-
HCNA Routing&Switching之GVRP
-
GVRP of hcna Routing & Switching
-
Seq2Seq实现闲聊机器人
-
【闲聊机器人】seq2seq模型的原理
随机推荐
- LeetCode 91. 解码方法
- Seq2seq implements chat robot
- [chat robot] principle of seq2seq model
- Leetcode 91. Decoding method
- HCNA Routing&Switching之GVRP
- GVRP of hcna Routing & Switching
- HDU7016 Random Walk 2
- [Code+#1]Yazid 的新生舞会
- CF1548C The Three Little Pigs
- HDU7033 Typing Contest
- HDU7016 Random Walk 2
- [code + 1] Yazid's freshman ball
- CF1548C The Three Little Pigs
- HDU7033 Typing Contest
- Qt Creator 自动补齐变慢的解决
- HALCON 20.11:如何处理标定助手品质问题
- HALCON 20.11:标定助手使用注意事项
- Solution of QT creator's automatic replenishment slowing down
- Halcon 20.11: how to deal with the quality problem of calibration assistant
- Halcon 20.11: precautions for use of calibration assistant
- “十大科学技术问题”揭晓!|青年科学家50²论坛
- "Top ten scientific and technological issues" announced| Young scientists 50 ² forum
- 求反转链表
- Reverse linked list
- js的数据类型
- JS data type
- 记一次文件读写遇到的bug
- Remember the bug encountered in reading and writing a file
- 单例模式
- Singleton mode
- 在这个 N 多编程语言争霸的世界,C++ 究竟还有没有未来?
- In this world of N programming languages, is there a future for C + +?
- es6模板字符
- js Promise
- js 数组方法 回顾
- ES6 template characters
- js Promise
- JS array method review
- 【Golang】️走进 Go 语言️ 第一课 Hello World
- [golang] go into go language lesson 1 Hello World