安装arbotix simulator仿真环境()

先安装rbx1功能包:

cd ~/catkin_ws/src
git clone https://github.com/pirobot/rbx1.git
cd rbx1
git checkout indigo-devel
cd ~/catkin_ws
catkin_make
source ~/catkin_ws/devel/setup.bash
rospack profile 

 安装模拟器:

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

删除早期版本的arbotix堆栈

rospack profile

一切成功后,先启动roscore,然后启动arbotix堆栈

roslaunch rbx1_bringup fake_turtlebot.launch

输出信息:

... logging to /home/cam/.ros/log/0e1bcdfa-7998-11e6-b214-b01041f9588f/roslaunch-cam-Aspire-V3-572G-17338.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://cam-Aspire-V3-572G:46539/

SUMMARY
========

CLEAR PARAMETERS
 * /arbotix/

PARAMETERS
 * /arbotix/baud: 115200
 * /arbotix/controllers/base_controller/Kd: 12
 * /arbotix/controllers/base_controller/Ki: 0
 * /arbotix/controllers/base_controller/Ko: 50
 * /arbotix/controllers/base_controller/Kp: 12
 * /arbotix/controllers/base_controller/accel_limit: 1.0
 * /arbotix/controllers/base_controller/base_frame_id: base_link
 * /arbotix/controllers/base_controller/base_width: 0.26
 * /arbotix/controllers/base_controller/ticks_meter: 4100
 * /arbotix/controllers/base_controller/type: diff_controller
 * /arbotix/joints/arm_elbow_flex_joint/id: 3
 * /arbotix/joints/arm_elbow_flex_joint/invert: True
 * /arbotix/joints/arm_elbow_flex_joint/max_speed: 100
 * /arbotix/joints/arm_elbow_flex_joint/neutral: 512
 * /arbotix/joints/arm_shoulder_lift_joint/id: 2
 * /arbotix/joints/arm_shoulder_lift_joint/invert: True
 * /arbotix/joints/arm_shoulder_lift_joint/max_speed: 100
 * /arbotix/joints/arm_shoulder_lift_joint/neutral: 512
 * /arbotix/joints/arm_shoulder_pan_joint/id: 1
 * /arbotix/joints/arm_shoulder_pan_joint/invert: False
 * /arbotix/joints/arm_shoulder_pan_joint/max_angle: 145
 * /arbotix/joints/arm_shoulder_pan_joint/max_speed: 100
 * /arbotix/joints/arm_shoulder_pan_joint/min_angle: -145
 * /arbotix/joints/arm_shoulder_pan_joint/neutral: 512
 * /arbotix/joints/arm_wrist_flex_joint/id: 4
 * /arbotix/joints/arm_wrist_flex_joint/invert: True
 * /arbotix/joints/arm_wrist_flex_joint/max_angle: 90
 * /arbotix/joints/arm_wrist_flex_joint/max_speed: 100
 * /arbotix/joints/arm_wrist_flex_joint/min_angle: -90
 * /arbotix/joints/arm_wrist_flex_joint/neutral: 512
 * /arbotix/joints/gripper_joint/id: 5
 * /arbotix/joints/gripper_joint/invert: False
 * /arbotix/joints/gripper_joint/max_angle: 25
 * /arbotix/joints/gripper_joint/max_speed: 100
 * /arbotix/joints/gripper_joint/min_angle: -20
 * /arbotix/joints/gripper_joint/neutral: 512
 * /arbotix/joints/head_pan_joint/id: 6
 * /arbotix/joints/head_pan_joint/invert: False
 * /arbotix/joints/head_pan_joint/max_angle: 145
 * /arbotix/joints/head_pan_joint/max_speed: 100
 * /arbotix/joints/head_pan_joint/min_angle: -145
 * /arbotix/joints/head_pan_joint/neutral: 512
 * /arbotix/joints/head_tilt_joint/id: 7
 * /arbotix/joints/head_tilt_joint/invert: False
 * /arbotix/joints/head_tilt_joint/max_angle: 90
 * /arbotix/joints/head_tilt_joint/max_speed: 100
 * /arbotix/joints/head_tilt_joint/min_angle: -90
 * /arbotix/joints/head_tilt_joint/neutral: 512
 * /arbotix/port: /dev/ttyUSB0
 * /arbotix/rate: 20
 * /arbotix/read_rate: 20
 * /arbotix/sim: True
 * /arbotix/sync_read: True
 * /arbotix/sync_write: True
 * /arbotix/write_rate: 20
 * /robot_description: <?xml version="1....
 * /robot_state_publisher/publish_frequency: 20.0
 * /rosdistro: indigo
 * /rosversion: 1.11.20
 * /use_sim_time: False

NODES
  /
    arbotix (arbotix_python/arbotix_driver)
    base_footprint_broadcaster (tf/static_transform_publisher)
    move_fake_pi_arm_start (rbx1_bringup/move_fake_pi_arm_start.py)
    robot_state_publisher (robot_state_publisher/state_publisher)

ROS_MASTER_URI=http://localhost:11311

core service [/rosout] found
process[arbotix-1]: started with pid [17360]
process[move_fake_pi_arm_start-2]: started with pid [17361]
process[robot_state_publisher-3]: started with pid [17362]
process[base_footprint_broadcaster-4]: started with pid [17367]

 使用一个模型的pi机器人,运行命令:

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

 

发布消息,测试模拟,使模拟机器人顺时针旋转:

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

需要停止机器人 ,在同一个终端窗口式Ctrl-C,或者发布空Twist message:

rostopic pub -1 /cmd_vel geometry_msgs/Twist '{}'
 

 

posted @ 2016-09-13 19:02  CAM&  阅读(855)  评论(1编辑  收藏  举报