yuzhenning / ROS_turtlebot2

This is a file record Ubuntu based ROS and Turtlebot2 control system
0 stars 0 forks source link

03 Basic ROS network and control Turtlebot, Kinect via ssh #3

Open yuzhenning opened 6 years ago

yuzhenning commented 6 years ago

Problem: "unfound command : resource "

Solution1: check bash document: sudo gedit ~/.bashrc Solution 2: 最近一段时间在使用Bash on Ubuntu on Windows做shell脚本调试时发现在脚本中使用source时会报错,上网查了下才了解到原来是在Ubuntu中使用的并不是bash,而是使用优化过的dash,而在dash中是没有source,而在bash中才有source,这就有点麻烦了,平时在写脚本时有时会调用系统的function和一些自定义的function,没有source确实有点不太方便,而在此时可以在使用dpkg-reconfigure来修改配置dash,在平时可以用以下方法来验证看下自己的系统中使用的shell环境: 测试: 运行 ls -l /bin/sh 后显示/bin/sh -> dash 这说明是用dash来进行解析的。 解决方案: 命令行执行:dpkg-reconfigure dash(需要root权限) 在界面中选择no 再运行ls -l /bin/sh 后显示/bin/sh -> bash

yuzhenning commented 5 years ago

Turtlebot ROS package install (Only avilable on ROS indigo and kinetic )

reference : https://www.ncnynl.com/archives/201705/1635.html https://wiki.ros.org/turtlebot $ sudo apt-get install ros-kinetic-turtlebot ros-kinetic-turtlebot-apps ros-kinetic-turtlebot-interactions ros-kinetic-kobuki-ftdi ros-kinetic-ar-track-alvar-msgs $ sudo apt-get install ros-kinetic-rocon-remocon ros-kinetic-rocon-qt-library ros-kinetic-turtlebot-simulator

yuzhenning commented 5 years ago

Install turtlebot package on ROS kinetic problem

今天在使用命令 "sudo apt-get install python3-pip"安装时,总是出现如下图这样的错误,开始以为是以为自己python版本的问题,后来发现无论装什么东西都会出现,这样的错误,错误展示: E: Sub-process /usr/bin/dpkg returned an error code (1) 进入如下目录: $ cd /var/lib/dpkg 删除下面这个文件: $ sudo mv info info.baksudo 重新创建这个文件: $ sudo mkdir info

yuzhenning commented 5 years ago

ROS master ip define

$ export ROS_MASTER_URI=http://192.168.x.xxx:11311
192.168.2.117_(umlab) or_ 192.168.1.101_(bnuzlab)_
$ export ROS_IP=192.168.x.xxx(host pc ip/robot self ip)

Or you can fix the ROS-MASTER definition to bashrc by following commands:

$ echo export ROS_MASTER_URI=http://192.168.x.xxx:11311 >>  ~/.bashrc
192.168.2.117_(umlab) or_ 192.168.1.101_(bnuzlab)_
$ echo export ROS_IP=192.168.x.xxx(host pc ip/robot self ip)  >>  ~/.bashrc
yuzhenning commented 5 years ago

Check SSH and control robot on host pc

control command:

$ ssh UserID@UserID
for example:
$ ssh nvidia@192.168.2.117