Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tutorials:advanced:new-robot [2019/02/23 08:36] – [URDF] vanessatutorials:advanced:new-robot [2019/03/05 12:08] (current) – [Action designators and plans] gkazhoya
Line 188: Line 188:
 ===== Action designators and plans ===== ===== Action designators and plans =====
  
-This is TODO... +Everything above motion designators should be independent of the robot platform. 
 +For example, try performing a picking up action with your robot
 +See [[http://cram-system.org/tutorials/intermediate/simple_mobile_manipulation_plan|this tutorial]] for an example.
 ===== Projection for your new robot ===== ===== Projection for your new robot =====
  
Line 219: Line 220:
  
 For reference and starting point take a look at those package for the pr2 or hsrb. For reference and starting point take a look at those package for the pr2 or hsrb.
-Open your ''roslisp_repl'' and load every packages you will need. +
  
  
Line 226: Line 227:
 ==== Spawn the robot in Bullet ==== ==== Spawn the robot in Bullet ====
  
-Use the Prolog assertion predicates. See example of how PR2 is spawned from a URDF in the bullet tutorial: http://cram-system.org/tutorials/intermediate/bullet_world#bullet_world_initialization.+Use the Prolog assertion predicates. See example of how PR2 is spawned from a URDF in the bullet tutorial: http://cram-system.org/tutorials/intermediate/bullet_world#bullet_world_initialization. Open your ''roslisp_repl'' and load the cram-bullet-world-tutorial, for now this containts everything we need for the first step
  
  
Line 260: Line 261:
                     (cram-robot-interfaces:robot ?robot)                     (cram-robot-interfaces:robot ?robot)
                     (assert (btr:object ?world :urdf ?robot ((0 0 0) (0 0 0 1)) :urdf ,robot-urdf))                     (assert (btr:object ?world :urdf ?robot ((0 0 0) (0 0 0 1)) :urdf ,robot-urdf))
-                    (cram-robot-interfaces:robot-arms-parking-joint-states ?robot ?joint-states) 
                     (assert (btr:joint-state ?world ?robot ?joint-states))                     (assert (btr:joint-state ?world ?robot ?joint-states))
                     (assert (btr:joint-state ?world ?robot (("torso_lift_joint" 0.15d0)))))))                     (assert (btr:joint-state ?world ?robot (("torso_lift_joint" 0.15d0)))))))
Line 272: Line 272:
 {{:tutorials:advanced:hsr_in_bullet_world.png?700|}} {{:tutorials:advanced:hsr_in_bullet_world.png?700|}}
  
- +The ''(cram-tf::init-tf)''command initalized some variables:
-At this moment the command: ''(cram-tf::init-tf)'' loads some variables:+
 <code lisp> <code lisp>
 (defvar *robot-base-frame* nil (defvar *robot-base-frame* nil
Line 289: Line 288:
   "Tool frame of the right arm. Initialized from CRAM robot desciption.")   "Tool frame of the right arm. Initialized from CRAM robot desciption.")
 </code> </code>
-Usually u will define those parameters in the ROBOT_description package. For now to simply test the beginning it is okay that this parameters got filled from the PR2_description package. But be aware that some joint and links does not have the same name. For example the hsr does not contain any joint or links with the name gripper like the PR2 does.+Usually u will define those parameters in the ROBOT_description package. For now to simply test the beginning its not necessry that this parameters got filled from the PR2_description package. But be aware that some joint and links does not have the same name. For example the HSR does not contain any joint or links with the name gripper like the PR2 does.
  
  
Line 304: Line 303:
 (btr:object btr:*current-bullet-world* 'my-robot) (btr:object btr:*current-bullet-world* 'my-robot)
 </code> </code>
-To get the instance of the spawned Bullet object there is a function.+
  
 After lifting the torso the HSR should looks like this:  After lifting the torso the HSR should looks like this: 
Line 378: Line 377:
 </code> </code>
  
-If no **gripper_tool_joint** is defined for your robot you need to add one in the URDF it self. It is important that the parent will be the wrist_palm_link and the joint is fixed. The origin you will need to change yourself it should be directly in the middle of the gripper. However since we dont want to change the original URDF we decided that there will be a setup-urdf.lisp file for the hsr that takes care of this +If no **gripper_tool_joint** is defined for your robot you need to add one in the URDF it self. It is important that the parent will be the wrist_palm_link and the joint is fixed. The origin you will need to change yourself it should be directly in the middle of the gripper. However since we dont want to change the original URDF we decided that there will be a setup-urdf.lisp file for the HSR that takes care of the necessary URDF changes
  
 <code lisp> <code lisp>