< >
Home » Turtlebot3-ARM教程_视频版 » Turtlebot3-ARM入门教程-抓取挑战之单个目标抓取测试

Turtlebot3-ARM入门教程-抓取挑战之单个目标抓取测试

** 说明

  • 本教程介绍如何进行一个简单快速的单个目标抓取测试

操作步骤

  • 下面进行一个简单的快速抓取测试

  • 在一个空旷的地方创建地图,AR标志可以后面再放上去 | 建图教程

  • 类似像下图一样围起来一个2.5x3米的场景

请输入图片描述

  • [Remote PC] 备份好scenario.yamlroom.yaml文件,再将其替换为下面内容

  • scenario.yaml

start :
  task : none
  args : [0]
  timeout : 0 #sec, 0 : no time out
  next_scenario : find_object_1
  scenario_on_failure : finish
  retry_times : 0  #times, 0 : no retry
  
# ==============================================
# =================== room 1 ===================

find_object_1 :
  task : find_object
  args : [room_1, object]
  timeout : 0 #sec, 0 : no time out
  next_scenario : nav_to_object_1
  scenario_on_failure : standby
  retry_times : 10  #times, 0 : no retry
 
nav_to_object_1 :
  task : navigation
  args : [room_1, object, none, none]   # room number, target type, room_number(real target), type
  timeout : 90 #sec, 0 : no time out
  next_scenario : approach_to_object_1
  scenario_on_failure : standby
  retry_times : 3  #times, 0 : no retry
  
approach_to_object_1 :
  task : approach
  args : [room_1, object, 2]   # room number, target type, repeat number
  timeout : 0 #sec, 0 : no time out
  next_scenario : pick_object_1
  scenario_on_failure : standby
  retry_times : 0  #times, 0 : no retry
 
pick_object_1:
  task : manipulation_task
  args : [room_1, object]
  timeout : 0 #sec, 0 : no time out
  next_scenario: grasp_on_1
  scenario_on_failure : standby
  retry_times : 0
  
grasp_on_1:
  task : gripper
  args : [close]
  timeout : 0 #sec, 0 : no time out
  next_scenario : move_arm_to_via_1
  scenario_on_failure : standby
  retry_times : 0
  
move_arm_to_via_1:
  task : manipulation_joint3
  args : [via_pose]
  timeout : 0 #sec, 0 : no time out
  next_scenario : move_arm_to_home_1
  scenario_on_failure : standby
  retry_times : 0
 
move_arm_to_home_1:
  task : manipulation_joint
  args : [home_with_object]
  timeout : 0 #sec, 0 : no time out
  next_scenario : leave_object_1
  scenario_on_failure : standby
  retry_times : 0
leave_object_1:
  task : leave
  args : [0.20]   # leave distance
  timeout : 0 #sec, 0 : no time out
  next_scenario : turn_to_room_1
  scenario_on_failure : standby
  retry_times : 0
 
turn_to_room_1:
  task : turn
  args : [room_1]   
  timeout : 0 #sec, 0 : no time out
  next_scenario : nav_to_room_1
  scenario_on_failure : standby
  retry_times : 0
 
nav_to_room_1 :
  task : navigation
  args : [room_1, none, room_1, target]   # room number, target type, room_number(real target), type
  timeout : 60 #sec, 0 : no time out
  next_scenario : find_target_1
  scenario_on_failure : standby
  retry_times : 3  #times, 0 : no retry
   
find_target_1 :
  task : find_object
  args : [room_1, target]
  timeout : 0 #sec, 0 : no time out
  next_scenario : nav_to_target_1
  scenario_on_failure : standby
  retry_times : 3  #times, 0 : no retry
 
nav_to_target_1 :
  task : navigation
  args : [room_1, target, none, none]   # room number, target type, room_number(real target), type
  timeout : 60 #sec, 0 : no time out
  next_scenario : approach_to_target_1
  scenario_on_failure : standby
  retry_times : 3  #times, 0 : no retry
  
approach_to_target_1 :
  task : approach
  args : [room_1, target, 1]   # room number, target type, repeat number
  timeout : 0 #sec, 0 : no time out
  next_scenario : move_arm_to_via_1b
  scenario_on_failure : standby
  retry_times : 0  #times, 0 : no retry

move_arm_to_via_1b:
  task : manipulation_joint
  args : [via_pose]
  timeout : 0 #sec, 0 : no time out
  next_scenario : place_target_1
  scenario_on_failure : standby
  retry_times : 0
  
place_target_1:
  task : manipulation_task
  args : [room_1, target]
  timeout : 0 #sec, 0 : no time out
  next_scenario: grasp_off_1
  scenario_on_failure : standby
  retry_times : 0
    
grasp_off_1:
  task : gripper
  args : [open]
  timeout : 0 #sec, 0 : no time out
  next_scenario : move_arm_to_home_1b
  scenario_on_failure : standby
  retry_times : 0
 
move_arm_to_home_1b:
  task : manipulation_joint
  args : [home_with_object]
  timeout : 0 #sec, 0 : no time out
  next_scenario : leave_target_1
  scenario_on_failure : standby
  retry_times : 0

leave_target_1:
  task : leave
  args : [0.20]   # leave distance
  timeout : 0 #sec, 0 : no time out
  next_scenario : turn_to_start_1
  scenario_on_failure : standby
  retry_times : 0
 
turn_to_start_1:
  task : turn
  args : [start]   
  timeout : 10
  next_scenario : nav_to_start_1
  scenario_on_failure : standby
  retry_times : 0
 
nav_to_start_1:
  task : navigation
  args : [start, none, none, none]   # room number, target type, room_number(real target), type
  timeout : 60 #sec, 0 : no time out
  next_scenario : finsh
  scenario_on_failure : standby
  retry_times : 3  #times, 0 : no retry

finish :
 timeout : 1 #sec, 0 : no time out
 task : none
 args : [0]
 next_scenario : none
 scenario_on_failure : finish
 retry_times : 0  #times, 0 : no retry
 
standby :
  task : navigation
  args : [start, none, none, none]   # room number, target type, room_number(real target), type
  timeout : 60 #sec, 0 : no time out
  next_scenario : finish
  scenario_on_failure : finish
  retry_times : 0  #times, 0 : no retry
  • room.yaml
room_1 :
  name : test_room
  object :
    marker : ar_marker_0
    position : [0.25, 0, 0.15]
  target :
    marker : ar_marker_4
    position : [0.25, 0, 0.15]
  x : [0, 0]
  y : [0, 0]
  • 放置机器人在坐标原点位置和放置AR_0和AR_4标志在机器人摄像头可观察到的位置

  • [Remote PC] 启动machine tag,Moveit,Navigation和Camera

$ roslaunch turtlebot3_home_service_challenge_tools turtlebot3_home_service_challenge_demo_remote.launch 
  • [Remote PC] 运行manager包
$ roslaunch turtlebot3_home_service_challenge_manager manager.launch
  • [Remote PC] 任务命令
// Ready : TurtleBot3 will prepare to start a mission.
$ rostopic pub -1 /tb3_hsc/command std_msgs/String ready_mission

// Start : TurtleBot3 will start a mission.
$ rostopic pub -1 /tb3_hsc/command std_msgs/String start_mission

// Stop : TurtleBot3 will stop running a mission.
$ rostopic pub -1 /tb3_hsc/command std_msgs/String stop_mission

// Restart : TurtleBot3 will restart a mission by a given scenario.
$ rostopic pub -1 /tb3_hsc/command std_msgs/String restart_mission:SCENARIO_NAME

演示视频

纠错,疑问,交流: 请进入讨论区点击加入Q群

获取最新文章: 扫一扫右上角的二维码加入“创客智造”公众号


标签: turtlebot3-arm入门教程