Cov txheej txheem:

ROS MoveIt Neeg Hlau Caj Npab Part 2: Neeg Hlau Tswj: 6 Kauj Ruam
ROS MoveIt Neeg Hlau Caj Npab Part 2: Neeg Hlau Tswj: 6 Kauj Ruam

Video: ROS MoveIt Neeg Hlau Caj Npab Part 2: Neeg Hlau Tswj: 6 Kauj Ruam

Video: ROS MoveIt Neeg Hlau Caj Npab Part 2: Neeg Hlau Tswj: 6 Kauj Ruam
Video: Plab Plab Ntswg..(Pluav Pluav Ntswg) Maiv Twm New Song 2023-2024 2024, Kaum ib hlis
Anonim
Image
Image

github.com/AIWintermuteAI/ros-moveit-arm.git

Hauv ib feem dhau los ntawm tsab xov xwm peb tau tsim URDF thiab XACRO cov ntaub ntawv rau peb cov neeg hlau sab caj npab thiab pib RVIZ los tswj peb cov neeg hlau caj npab hauv kev sim sim ib puag ncig.

Lub sijhawm no peb yuav ua nws nrog caj npab tiag tiag! Peb yuav ntxiv tus tuav, sau tus neeg hlau tswj thiab (xaiv tau) tsim IKfast inverse kinematics solver.

Geronimo!

Kauj ruam 1: Ntxiv Gripper

Ntxiv Gripper
Ntxiv Gripper
Ntxiv Gripper
Ntxiv Gripper
Ntxiv Gripper
Ntxiv Gripper

Ntxiv gripper yog qhov me ntsis tsis meej pem thaum xub thawj, yog li kuv hla qhov no hauv kab lus dhau los. Nws muab tawm tsis yog li nyuaj tom qab tag nrho.

Koj yuav tsum tau hloov kho koj li URDF cov ntaub ntawv txhawm rau ntxiv cov txuas txuas thiab pob qij txha.

Cov ntaub ntawv hloov kho URDF rau kuv tus neeg hlau txuas nrog rau theem no. Yeej nws ua raws tib lub tswv yim ib yam li ib feem ntawm caj npab, Kuv nyuam qhuav ntxiv peb qhov txuas tshiab (claw_base, claw_r thiab claw_l) thiab peb qhov sib txuas tshiab (sib koom ua ke 5 tau tsau, thiab sib koom ua ke 6, sib koom ua ke 7 yog pob qij txha txuas ntxiv).

Tom qab koj hloov kho koj cov ntaub ntawv URDF koj kuj tseem yuav tsum hloov kho MoveIt tsim cov pob thiab xacro cov ntaub ntawv los ntawm kev siv MoveIt teeb tsa pab.

Tua tawm tus pabcuam teeb tsa nrog cov lus txib hauv qab no

roslaunch moveit_setup_assistant setup_assistant.launch

Nyem rau Kho kom raug MoveIt Configuration thiab xaiv daim nplaub tshev nrog koj pob MoveIt.

Ntxiv cov phiaj xwm tshiab pawg gripper (nrog txuas thiab sib koom ua ke rau tus tuav) thiab tseem yog qhov ua kom kawg. Kuv cov chaw nyob hauv cov duab hauv qab no. Daim ntawv ceeb toom tias koj tsis xaiv kinematics solver rau tus tuav, nws tsis tsim nyog. Tsim cov pob thiab sau cov ntaub ntawv.

Khiav

ua catkin

hais kom ua hauv koj qhov chaw ua haujlwm catkin.

Zoo, tam sim no peb muaj caj npab nrog tus tuav!

Kauj Ruam 2: Tsim Lub Caj Npab

Tsim Lub Caj Npab
Tsim Lub Caj Npab
Tsim Lub Caj Npab
Tsim Lub Caj Npab
Tsim Lub Caj Npab
Tsim Lub Caj Npab
Tsim Lub Caj Npab
Tsim Lub Caj Npab

Raws li kuv tau hais ua ntej caj npab 3D qauv yog tsim los ntawm Juergenlessner, ua tsaug rau koj rau kev ua haujlwm zoo. Cov ncauj lus kom ntxaws qhia tuaj yeem nrhiav pom yog tias koj ua raws qhov txuas.

Kuv yuav tsum tau hloov kho qhov kev tswj hwm ho. Kuv siv Arduino Uno nrog Sensor thaiv rau kev tswj hwm servos. Cov ntaub thaiv npog Sensor pab ntau nrog ua kom yooj yim rau cov thaiv thiab tseem ua rau nws yooj yim los muab lub zog sab nraud rau servos. Kuv siv 12V 6A lub zog hloov hluav taws xob txuas los ntawm cov lej nqis qis (6V) rau Sensor Shield.

Lus ceeb toom ntawm servos. Kuv siv MG 996 HR servos yuav los ntawm Taobao, tab sis qhov zoo yog qhov phem heev. Nws yog qhov twv txiaj yuam pov Suav suav daws. Ib qho rau lub luj tshib sib koom tsis tau muab lub zog txaus thiab txawm pib fuming ib zaug hauv qhov hnyav. Kuv yuav tsum tau hloov lub luj tshib sib koom ua ke nrog MG 946 HR los ntawm cov chaw tsim khoom zoo dua.

Zaj dab neeg luv luv - yuav cov khoom siv zoo. Yog tias cov pa luam yeeb tawm ntawm koj cov servos, siv cov servos zoo dua. 6V yog qhov hluav taws xob muaj kev nyab xeeb heev, tsis txhob nce nws. Nws yuav tsis nce lub zog, tab sis tuaj yeem ua rau lub servos puas.

Txuas rau servos raws li hauv qab no:

puag 2

xub pwg 24 lub xub pwg13 3

luj 6

tug grip8

dab teg 11

Xav tias dawb los hloov nws tsuav koj tseem nco ntsoov hloov Arduino daim duab.

Tom qab koj ua tiav nrog kho vajtse, cia saib ntawm daim duab loj dua!

Kauj ruam 3: MoveIt RobotCommander Interface

MoveIt RobotCommander Interface
MoveIt RobotCommander Interface

Yog li, tam sim no yog dab tsi? Vim li cas koj thiaj xav tau MoveIt thiab ROS ib qho ntxiv? Tsis yog koj tsuas yog tswj caj npab los ntawm Arduino code ncaj qha?

Yog, koj ua tau.

Okay, tam sim no yuav ua li cas siv GUI lossis Python/C ++ code los muab cov neeg hlau ua kom mus? Puas yog Arduino ua tau?

Raws li. Txog qhov ntawd koj yuav tsum tau sau ib qho kev hloov pauv kinematics uas yuav siv tus neeg hlau tsim (kev txhais lus thiab kev sib hloov ua haujlwm hauv 3D qhov chaw) thiab hloov nws mus rau cov lus sib koom ua ke rau servos.

Txawm hais tias koj tuaj yeem ua nws tus kheej, nws yog ntuj raug txim ntawm ntau txoj haujlwm los ua. Yog li, MoveIt thiab ROS muab qhov sib cuam tshuam zoo rau IK (inverse kinematics) daws kom ua txhua qhov hnyav trigonometrical nqa rau koj.

Cov lus teb luv: Yog, koj tuaj yeem ua caj npab yooj yim uas yuav ua tiav qhov nyuaj-coded Arduino kos duab mus los ntawm ib qho ua rau lwm tus. Tab sis yog tias koj xav ua kom koj cov neeg hlau ntse dua thiab ntxiv lub peev xwm ntawm lub khoos phis tawj, MoveIt thiab ROS yog txoj hauv kev mus.

Kuv ua daim duab yooj yim heev piav qhia tias MoveIt moj khaum ua haujlwm li cas. Hauv peb qhov xwm txheej nws yuav yooj yim dua, vim tias peb tsis muaj kev tawm tswv yim los ntawm peb cov kev pabcuam thiab yuav siv /sib koom ua ke cov ncauj lus los muab cov neeg hlau tswj nrog cov ces kaum rau servos. Peb tsuas yog tsis muaj ib feem uas yog tus neeg hlau tswj.

Peb tos dab tsi? Cia peb sau qee tus neeg tswj hwm neeg hlau, yog li peb cov neeg hlau yuav yog … koj paub, tswj tau ntau dua.

Kauj Ruam 4: Arduino Code rau Robot Controller

Arduino Code rau Robot Controller
Arduino Code rau Robot Controller
Arduino Code rau Robot Controller
Arduino Code rau Robot Controller
Arduino Code rau Robot Controller
Arduino Code rau Robot Controller

Hauv peb qhov xwm txheej Arduino Uno khiav ROS node nrog rosserial yuav yog tus tswj xyuas neeg hlau. Arduino daim duab kos duab tau txuas rau cov kauj ruam no thiab tseem muaj nyob ntawm GitHub.

ROS ntawm kev khiav ntawm Arduino Uno ib txwm sau npe rau /JointState lub ncauj lus luam tawm ntawm lub khoos phis tawj khiav MoveIt thiab tom qab ntawd hloov cov kaum sib koom ua ke los ntawm cov kab ntawm radians mus rau qib thiab hla lawv mus rau servos siv cov qauv Servo.h tsev qiv ntawv.

Cov tshuaj no yog hacky me ntsis thiab tsis ua li cas nws tau ua tiav nrog cov neeg hlau tsim khoom. Qhov zoo tshaj koj yuav tsum tshaj tawm txoj kev txav mus los ntawm /FollowJointState lub ncauj lus thiab tom qab ntawd tau txais cov lus tawm tswv yim ntawm /Cov ncauj lus sib koom. Tab sis hauv peb txhais caj npab cov haujlwm nyiam ua haujlwm tsis tuaj yeem muab cov lus tawm tswv yim, yog li peb tsuas yog sau npe ncaj qha rau /Cov ncauj lus sib koom, tshaj tawm los ntawm FakeRobotController node. Yeej peb yuav xav tias txhua lub ces kaum peb tau dhau mus rau servos tau ua tiav lub hom phiaj.

Yog xav paub ntxiv txog yuav ua li cas rosserial ua haujlwm koj tuaj yeem sab laj cov lus qhia hauv qab no

wiki.ros.org/rosserial_arduino/Tutorials

Tom qab koj xa cov duab kos rau Arduino Uno, koj yuav tsum txuas nws nrog cov xov tooj txuas mus rau lub khoos phis tawj khiav koj li kev teeb tsa ROS.

Txhawm rau nqa tag nrho cov kab ke ua raws cov lus txib hauv qab no

roslaunch my_arm_xacro demo.launch rviz_tutorial: = muaj tseeb

sudo chmod -R 777 /dev /ttyUSB0

rosrun rosserial_python serial_node.py _port: =/dev/ttyUSB0 _baud: = 115200

Tam sim no koj tuaj yeem siv cov cim sib tham sib hauv RVIZ kom txav cov neeg hlau caj npab mus rau ib qho thiab tom qab ntawd nias Txoj Haujlwm thiab Ua Haujlwm rau nws kom txav mus rau txoj haujlwm.

Khawv koob!

Tam sim no peb tau npaj sau Python code rau peb qhov kev xeem nce toj. Zoo, yuav luag …

Kauj Ruam 5: (Tsis teb los tau) Tsim IKfast Plug-in

Los ntawm lub hauv paus MoveIt qhia siv KDL kinematics solver, uas tsis ua haujlwm tiag nrog tsawg dua 6 DOF caj npab. Yog tias koj ua raws cov lus qhia no ze koj yuav pom tias cov qauv caj npab hauv RVIZ tsis tuaj yeem mus rau qee qhov ua haujlwm uas yuav tsum tau txhawb nqa los ntawm caj npab teeb tsa.

Cov lus pom zoo daws yog los tsim kev cai kinematics daws siv OpenRave. Nws tsis yog qhov nyuaj, tab sis koj yuav tsum tsim nws thiab nws yog kev vam khom los ntawm qhov chaw lossis siv lub thawv ntim khoom, qhov twg koj xav tau.

Cov txheej txheem tau teev tseg zoo heev hauv qhov kev qhia no. Nws tau lees paub los ua haujlwm ntawm VM khiav Ubuntu 16.04 thiab ROS Kinetic.

Kuv siv cov lus txib hauv qab no los tsim cov kev daws teeb meem

openrave.py --database inversekinematics --robot = arm.xml --iktype = translation3d --iktests = 1000

thiab tom qab ntawd khiav

rosrun moveit_kinematics create_ikfast_moveit_plugin.py test_robot npab my_arm_xacro ikfast0x1000004a. Translation3D.0_1_2_f3.cpp

los tsim MoveIt IKfast plug-in.

Cov txheej txheem tag nrho yog siv sijhawm me ntsis, tab sis tsis nyuaj heev yog tias koj ua raws cov lus qhia ze. Yog tias koj muaj lus nug txog ntu no, thov hu rau kuv hauv cov lus lossis PM.

Kauj Ruam 6: Ramp Test

Ramp Test!
Ramp Test!
Ramp Test!
Ramp Test!

Tam sim no peb tau npaj los sim qhov kev xeem ramp, uas peb yuav ua tiav siv ROS MoveIt Python API.

Python code tau txuas rau cov kauj ruam no thiab tseem muaj nyob ntawm github chaw cia khoom. Yog tias koj tsis muaj qhov chaw nce lossis xav sim lwm qhov kev sim koj yuav xav tau hloov tus neeg hlau poses hauv txoj cai. Rau qhov ua thawj zaug ntawd

rostopic echo/rviz_moveit_motion_planning_display/robot_interaction_interactive_marker_topic/tawm tswv yim

hauv lub davhlau ya nyob twg thaum twb tau khiav RVIZ thiab MoveIt. Tom qab ntawd txav cov neeg hlau nrog cov cim sib tham sib mus rau txoj haujlwm xav tau. Txoj haujlwm thiab kev qhia tus nqi yuav raug muab tso rau hauv lub davhlau ya nyob twg. Tsuas yog luam lawv rau Python code.

Txhawm rau ua qhov kev xeem ua haujlwm

rosrun my_arm_xacro de/pick_2.py

nrog RVIZ thiab rosserial node twb tau ua haujlwm lawm.

Nyob twj ywm rau ntu thib peb ntawm tsab xov xwm, qhov twg kuv yuav siv lub koob yees duab tso suab rau kev txheeb xyuas cov khoom thiab ua haujlwm xaiv thiab tso cov raj xa dej rau cov khoom yooj yim!

Pom zoo: