{"id":5846,"date":"2023-07-29T16:26:21","date_gmt":"2023-07-29T07:26:21","guid":{"rendered":"https:\/\/now0930.pe.kr\/wordpress\/?p=5846"},"modified":"2023-07-31T08:30:24","modified_gmt":"2023-07-30T23:30:24","slug":"moveit2-tutorial-%eb%94%b0%eb%9d%bc%ed%95%98%ea%b8%b0setfromik","status":"publish","type":"post","link":"https:\/\/now0930.pe.kr\/wordpress\/moveit2-tutorial-%eb%94%b0%eb%9d%bc%ed%95%98%ea%b8%b0setfromik\/","title":{"rendered":"MoveIt2 tutorial \ub530\ub77c\ud558\uae30(setFromIK)"},"content":{"rendered":"\n<p>\uc778\ud130\ub137\uc5d0 \uacf5\uac1c\ub41c <a href=\"https:\/\/moveit.picknik.ai\/main\/doc\/examples\/move_group_interface\/move_group_interface_tutorial.html\">MoveIt2 tutorial<\/a>\uc744 \ub530\ub77c\ud558\ub2e4 \ubcf4\uba74 \ub9ce\uc740 \uc0ac\uc2e4\uc744 \ud559\uc2b5\ud560 \uc218 \uc788\ub2e4. \ub2e4\ub9cc \uadf8\ub300\ub85c \ub530\ub77c\ud558\uba74 \uadf8 \uac10\ub3d9\uc774 \uc801\uc5b4, \ub0b4\uac00 \ub9c8\uc74c\ub300\ub85c \ud574\ubcf4\uae30\ub85c \ud588\ub2e4. ABB\uac00 \uc778\ud130\ub137\uc5d0 \uacf5\uac1c\ud55c ABB_IRB2400 urdf \ud30c\uc77c\ub85c \uc2dc\uc791\ud588\ub2e4. \ub0b4\uac00 \ud55c \uc0bd\uc9c8\uc744 \uc5ec\uae30\uc5d0 \ub044\uc801\uc778\ub2e4.<\/p>\n\n\n\n<p>setup assistant\ub85c urdf \ud30c\uc77c\uc744 \ub85c\ub529\ud558\uace0, move_group, kinematics solver, pose \ub4f1\uc744 \uc124\uc815\ud558\uc5ec \uc6c0\uc9c1\uc774\ub294 Manuplator\ub97c \ud504\ub85c\uc81d\ud2b8 \uc774\ub984 + moveit_config \ub514\ub809\ud1a0\ub9ac\uc5d0 \uc800\uc7a5\ud588\ub2e4. \uae30\ubcf8\uc73c\ub85c \uc81c\uacf5\ub41c demo.launch.py\uc744 \uc2e4\ud589\ud558\uc5ec Rviz\ub97c \uc5f4\uace0, \ub9c8\uc6b0\uc2a4 \ubc84\ud2bc\uc73c\ub85c robotModel, MarkArray, panel\uc744 \ucd94\uac00\ud588\ub2e4. Planning with Path Constraints \ubd80\ubd84\uc5d0\uc11c \ub9c9\ud614\ub294\ub370, <\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">start_state.setFromIK(joint_model_group, start_pose2);<\/pre>\n\n\n\n<p>\ub97c \uc2e4\ud589\ud558\uba74 <\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">No kinematics solver instantiated for group '%s<\/pre>\n\n\n\n<p>\uba54\uc138\uc9c0\ub97c \ub0b4\uace0 \ud504\ub85c\uadf8\ub7a8\uc774 \uc8fd\ub294\ub2e4. <a href=\"http:\/\/docs.ros.org\/en\/jade\/api\/moveit_core\/html\/robot__state_8cpp_source.html\">RobotState<\/a> Class\ub97c \ucc3e\uc544\ubcf4\ub2c8 \uc778\uc790\ub85c \uc81c\uacf5\ub41c JointModelGroup\uc5d0\uc11c SolverInstance\ub97c \uc5bb\uc9c0 \ubabb\ud558\uba74 error \ucc98\ub9ac\ud55c\ub2e4.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">01278 bool moveit::core::RobotState::setFromIK(const JointModelGroup* jmg, const geometry_msgs::Pose&amp; pose,\n01279                                          unsigned int attempts, double timeout,\n01280                                          const GroupStateValidityCallbackFn&amp; constraint,\n01281                                          const kinematics::KinematicsQueryOptions&amp; options)\n01282 {\n01283   const kinematics::KinematicsBaseConstPtr&amp; solver = jmg->getSolverInstance();\n01284   if (!solver)\n01285   {\n01286     logError(\"No kinematics solver instantiated for group '%s'\", jmg->getName().c_str());\n01287     return false;\n01288   }\n01289   return setFromIK(jmg, pose, solver->getTipFrame(), attempts, timeout, constraint, options);\n01290 }\n01291 <\/pre>\n\n\n\n<p>JointModelGroup\uc740 moveit setup assistanct\uac00 \uc124\uc815\ud558\ub294 \ub4ef \ud55c\ub370, \uc5b4\ub5bb\uac8c \uc124\uc815\ud558\ub294\uc9c0 \uc815\ud655\ud558\uac8c \uc124\uba85\ub418\uc5b4 \uc788\uc9c0 \uc54a\uc558\ub2e4. moveit setup assistant\ub85c \uc124\uc815\ud560 \ub54c kinematics solver\ub97c \uc120\ud0dd\ud558\ub294 \ud56d\ubaa9\uc774 \uc788\ub294\ub370, \ub098\ub294 \uc81c\ub300\ub85c \uc120\ud0dd\ud588\ub294\ub370 \ubb38\uc81c\uac00 \uc788\ub2e4.<\/p>\n\n\n\n<p>\uc81c\uacf5\ub41c panda_arm \uc608\uc81c\uac00 \uc5b4\ub5bb\uac8c \ub3cc\uc544\uac00\ub294\uc9c0 \ub2e4\uc2dc \uc0b4\ud3b4 \ubcf4\uae30\ub85c \ud588\ub2e4. moveit2_tutorial\uc5d0 panda_arm\uc73c\ub85c \uc81c\uacf5\ub41c \ud56d\ubaa9\uc744 \ucc3e\uc544 move_group\uc5d0 \ud574\ub2f9\ud558\ub294 \ubd80\ubd84\uc744 launch \ud588\ub2e4. moveit2_tutorial\uc744 \uc124\uce58\ud558\uba74 moveit_resources\uc5d0 panda_move_config\uac00 \uc788\ub294\ub370 \uc5ec\uae30 demo.launch.py\ub97c \uc2e4\ud589\ud574 \ubcf4\uc558\ub2e4.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">root@rygen3600:\/home\/ros2_test#ros2 launch moveit_resources_panda_moveit_config demo.launch.py\n...\n[move_group-4] [INFO] [1690614580.226886350] [move_group.move_group]: \n[move_group-4] \n[move_group-4] ********************************************************\n[move_group-4] * MoveGroup using: \n[move_group-4] *     - ApplyPlanningSceneService\n[move_group-4] *     - ClearOctomapService\n[move_group-4] *     - CartesianPathService\n[move_group-4] *     - ExecuteTrajectoryAction\n[move_group-4] *     - GetPlanningSceneService\n[move_group-4] *     - KinematicsService\n[move_group-4] *     - MoveAction\n[move_group-4] *     - MotionPlanService\n[move_group-4] *     - QueryPlannersService\n[move_group-4] *     - StateValidationService\n[move_group-4] ********************************************************\n[move_group-4] <\/pre>\n\n\n\n<p>parameter\uac00 \uc5b4\ub5bb\uac8c \uc81c\uacf5\ub418\ub294\uc9c0 \uc54c\uc544\ubcf4\uae30 \uc704\ud574 param list\ub97c \ud655\uc778\ud574 \ubcf4\uace0, \uc758\uc2ec\ub418\ub294 kinematics_solver \uac12\uc744 \ud655\uc778\ud588\ub2e4. robot_description\uc5d0 solver\ub97c \uc124\uc815\ud560 \uc218 \uc788\ub294\ub370, moveit setup assistant\uac00 \uc124\uc815\ud55c \uac12\uc73c\ub85c \ub3d9\uc791\ud558\uace0 \uc788\ub2e4.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">root@rygen3600:\/home\/ros2_test\/src\/hello_moveit\/debug# ros2 param get \/move_group robot_description_kinematics.panda_arm.kinematics_solver\nString value is: kdl_kinematics_plugin\/KDLKinematicsPlugin<\/pre>\n\n\n\n<p>\ub0b4\uac00 \ub9cc\ub4e0 ABB \ub85c\ubd07\uc740 \ud574\ub2f9 node\uac00 \uc5c6\ub2e4. \uc774\uc81c \ubb38\uc81c\uac00 \ubb34\uc5c7\uc778\uc9c0 \uc54c\uc558\ub2e4. launch\ud560 \ub54c \ud574\ub2f9 \uac12\uc744 \ub123\uc5b4\uc918\uc57c \ud558\ub294\ub370, \ub0b4\uac00 \ube7c\uba39\uace0 \ub123\uc5b4\uc8fc\uc9c0 \uc54a\uc558\ub2e4. \uc774\uc81c panda_arm demo \ud30c\uc77c\uc744 \ubcf4\uace0, \uc5b4\ub5bb\uac8c \uc124\uc815\ud574\uc57c \ud558\ub294\uc9c0 \uc54c\uc544\ubd10\uc57c \ud55c\ub2e4.<\/p>\n\n\n\n<p>panda demo\ub97c \uc790\uc138\ud788 \ubcf4\ub2c8, \ub178\ub4dc\ub97c \ub9cc\ub4e4\uc5b4\uc11c robot_description\uc5d0 kinematics\ub97c \uc124\uc815\ud574 \uc8fc\uc5c8\ub2e4. \ub098\ub294 ros run\uc73c\ub85c \ud574\ub2f9 \ud504\ub85c\uadf8\ub7a8\ub9cc \uc2e4\ud589\ud574\uc8fc\uc5b4 kinematics_solver\uac00 \uc124\uc815\ub418\uc9c0 \uc54a\uc558\ub2e4. \uc544\ub798 \ud615\uc2dd\uc73c\ub85c \ub178\ub4dc\ub97c \ub9cc\ub4e4\uc5b4 \uc900\ub2e4.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">root@rygen3600:\/home\/ros2_test# cat src\/hello_moveit\/launch\/my_demo.launch.py \nfrom launch import LaunchDescription\nfrom launch_ros.actions import Node\nfrom moveit_configs_utils import MoveItConfigsBuilder\n\n\ndef generate_launch_description():\n    moveit_config = MoveItConfigsBuilder(\"hello\").to_moveit_configs()\n\n    # MoveGroupInterface demo executable\n    move_group_demo = Node(\n        name=\"my_move_group_interface\",\n        package=\"hello_moveit\",\n        executable=\"planning\",\n        output=\"screen\",\n        parameters=[\n            moveit_config.robot_description,\n            moveit_config.robot_description_semantic,\n            moveit_config.robot_description_kinematics,\n        ],\n    )\n\n    return LaunchDescription([move_group_demo])\n<\/pre>\n\n\n\n<p>\uc774\uc81c \uc0c8\ub85c\uc6b4 \ubb38\uc81c\uac00 \uc788\ub2e4. orientation constraint\ub97c \uc124\uc815\ud558\uba74 \ub85c\ubd07\uc774 \uc81c\ub300\ub85c \uc6c0\uc9c1\uc774\uc9c0 \uc54a\ub294\ub2e4. interactive marker\ub294 \uc27d\uac8c planning \ud558\ub294\ub370, \ud504\ub85c\uadf8\ub7a8\uc73c\ub85c \ud558\uba74 \uc9e7\uc740 \uac70\ub9ac\ub3c4 planning\uc774 \ub192\uc740 \ud655\uc728\ub85c \uc2e4\ud328\ud55c\ub2e4.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\uc778\ud130\ub137\uc5d0 \uacf5\uac1c\ub41c MoveIt2 tutorial\uc744 \ub530\ub77c\ud558\ub2e4 \ubcf4\uba74 \ub9ce\uc740 \uc0ac\uc2e4\uc744 \ud559\uc2b5\ud560 \uc218 \uc788\ub2e4. \ub2e4\ub9cc \uadf8\ub300\ub85c \ub530\ub77c\ud558\uba74 \uadf8 \uac10\ub3d9\uc774 \uc801\uc5b4, \ub0b4\uac00 \ub9c8\uc74c\ub300\ub85c \ud574\ubcf4\uae30\ub85c [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1049],"tags":[1148,1147,1044,1149],"class_list":["post-5846","post","type-post","status-publish","format-standard","hentry","category-ros","tag-kinematic_solver","tag-parameter","tag-ros","tag-setfromik"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/now0930.pe.kr\/wordpress\/wp-json\/wp\/v2\/posts\/5846","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/now0930.pe.kr\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/now0930.pe.kr\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/now0930.pe.kr\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/now0930.pe.kr\/wordpress\/wp-json\/wp\/v2\/comments?post=5846"}],"version-history":[{"count":5,"href":"https:\/\/now0930.pe.kr\/wordpress\/wp-json\/wp\/v2\/posts\/5846\/revisions"}],"predecessor-version":[{"id":5852,"href":"https:\/\/now0930.pe.kr\/wordpress\/wp-json\/wp\/v2\/posts\/5846\/revisions\/5852"}],"wp:attachment":[{"href":"https:\/\/now0930.pe.kr\/wordpress\/wp-json\/wp\/v2\/media?parent=5846"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/now0930.pe.kr\/wordpress\/wp-json\/wp\/v2\/categories?post=5846"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/now0930.pe.kr\/wordpress\/wp-json\/wp\/v2\/tags?post=5846"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}