安装ROS 模拟器 arbotix

来源:互联网 发布:mac远程控制windows 编辑:程序博客网 时间:2024/05/29 08:03

安装ROS 模拟器 arbotix

一、安装模拟器

$ sudo apt-get install ros-indigo-arbotix-*

er、测试模拟器

$ roslaunch rbx1_bringup fake_turtlebot.launch

如果安装成功你会看到输出以下信息:

process[arbotix-1]: started with pid [4896]process[robot_state_publisher-2]: started with pid [4897][INFO] [WallTime: 1338681385.068539] ArbotiX being simulated.[INFO] [WallTime: 1338681385.111492] Started DiffController(base_controller). Geometry: 0.26m wide, 4100.0 ticks/m.
      注意!!!!!

我这里是用ROS by example in indigo V1 的代码进行测试的,如果没有,要先下载他的代码拷贝到catkin_ws/src下,然后catkin_make 一下。代码链接
rbx1代码

三、运行模拟器

1.我们这里利用Pi Robot 进行测试

$ roslaunch rbx1_bringup fake_pi_robot.launch

2.打开模拟器

$ rosrun rviz rviz -d `rospack find rbx1_nav`/sim.rviz

3.我们对Pi Robot 进行参数设置,使其开始运行

$ rostopic pub -r 10 /cmd_vel geometry_msgs/Twist '{linear: {x: 0.2, y:0, z: 0}, angular: {x: 0, y: 0, z: 0.5}}'

4.运行效果如下:
这里写图片描述

5.如果想停止小车旋转,则在同一个终端按下Ctrl-C,然后输入以下指令:

$ rostopic pub -1 /cmd_vel geometry_msgs/Twist '{}'
1 0
原创粉丝点击