怎么用rocon remocon连接自己的机器人
展开全部
1,安装依赖
sudo apt-get install ros-indigo-turtlebot ros-indigo-turtlebot-apps ros-indigo-turtlebot-interactions ros-indigo-turtlebot-simulator
ros-indigo-kobuki-ftdi ros-indigo-rocon-remocon ros-indigo-rocon-qt-library ros-indigo-ar-track-alvar-msgs
2,turtlebot软件包源安装(同样的在主机PC上也执行这些)
准备
> sudo apt-get install python-rosdep python-wstool ros-indigo-ros
> sudo rosdep init
> rosdep update
正式安装
可以在home目录下先建立一个文件夹在进入这个文件夹执行以下操作
> mkdir ~/rocon
> cd ~/rocon
> wstool init -j5 src
> source /opt/ros/indigo/setup.bash
> rosdep install --from-paths src -i -y
> catkin_make
> mkdir ~/kobuki
> cd ~/kobuki
> wstool init src -j5
> source ~/rocon/devel/setup.bash
> rosdep install --from-paths src -i -y
> catkin_make
> mkdir ~/turtlebot
> cd ~/turtlebot
> wstool init src -j5
> source ~/kobuki/devel/setup.bash
> rosdep install --from-paths src -i -y
> catkin_make
如果你已经新建了文件夹 source的时候记得更改目录 否则会出错
3,把setup.bash source到终端启动文件里
# For a deb installation
> echo "source /opt/ros/indigo/setup.bash" >> ~/.bashrc
# For a source installation
> echo "source ~/turtlebot/devel/setup.bash" >> ~/.bashrc
配置turtlebot与主机PC的通信
1,使用ifconfig查看自己的ip
2,安装ssh在turtlebot还有pc上
> sudo apt-get install openssh-server
像下面这样从pc远程进入turtlebot的电脑
> ssh turtle@
3,开始配置turtlebot的网络
> echo export ROS_MASTER_URI= >> ~/.bashrc
> echo export ROS_HOSTNAME=IP_OF_TURTLEBOT >> ~/.bashrc
> echo export ROS_MASTER_URI= >> ~/turtlebot/devel/setup.sh
> echo export ROS_HOSTNAME=IP_OF_TURTLEBOT >> ~/turtlebot/devel/setup.sh
配置完成 重启
IP_OF_TURTLEBOT 是turtlebot的ip地址
配置电脑的网络
> echo export ROS_MASTER_URI= >> ~/.bashrc
> echo export ROS_HOSTNAME=IP_OF_PC >> ~/.bashrc
4,测试是否配置成功
> rostopic list
没有出现东西就是错的 (当然要首先打开roscore)
sudo apt-get install ros-indigo-turtlebot ros-indigo-turtlebot-apps ros-indigo-turtlebot-interactions ros-indigo-turtlebot-simulator
ros-indigo-kobuki-ftdi ros-indigo-rocon-remocon ros-indigo-rocon-qt-library ros-indigo-ar-track-alvar-msgs
2,turtlebot软件包源安装(同样的在主机PC上也执行这些)
准备
> sudo apt-get install python-rosdep python-wstool ros-indigo-ros
> sudo rosdep init
> rosdep update
正式安装
可以在home目录下先建立一个文件夹在进入这个文件夹执行以下操作
> mkdir ~/rocon
> cd ~/rocon
> wstool init -j5 src
> source /opt/ros/indigo/setup.bash
> rosdep install --from-paths src -i -y
> catkin_make
> mkdir ~/kobuki
> cd ~/kobuki
> wstool init src -j5
> source ~/rocon/devel/setup.bash
> rosdep install --from-paths src -i -y
> catkin_make
> mkdir ~/turtlebot
> cd ~/turtlebot
> wstool init src -j5
> source ~/kobuki/devel/setup.bash
> rosdep install --from-paths src -i -y
> catkin_make
如果你已经新建了文件夹 source的时候记得更改目录 否则会出错
3,把setup.bash source到终端启动文件里
# For a deb installation
> echo "source /opt/ros/indigo/setup.bash" >> ~/.bashrc
# For a source installation
> echo "source ~/turtlebot/devel/setup.bash" >> ~/.bashrc
配置turtlebot与主机PC的通信
1,使用ifconfig查看自己的ip
2,安装ssh在turtlebot还有pc上
> sudo apt-get install openssh-server
像下面这样从pc远程进入turtlebot的电脑
> ssh turtle@
3,开始配置turtlebot的网络
> echo export ROS_MASTER_URI= >> ~/.bashrc
> echo export ROS_HOSTNAME=IP_OF_TURTLEBOT >> ~/.bashrc
> echo export ROS_MASTER_URI= >> ~/turtlebot/devel/setup.sh
> echo export ROS_HOSTNAME=IP_OF_TURTLEBOT >> ~/turtlebot/devel/setup.sh
配置完成 重启
IP_OF_TURTLEBOT 是turtlebot的ip地址
配置电脑的网络
> echo export ROS_MASTER_URI= >> ~/.bashrc
> echo export ROS_HOSTNAME=IP_OF_PC >> ~/.bashrc
4,测试是否配置成功
> rostopic list
没有出现东西就是错的 (当然要首先打开roscore)
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询