Difference between revisions of "Creating a CRAM Package for the Simple Mobile Manipulation Plan"

From David Vernon's Wiki
Jump to: navigation, search
(Copying the Bullet World Demonstration Files)
(Copying the Bullet World Demonstration Files)
Line 40: Line 40:
 
Now, let's customize it so that it refers to <code>cram_my_intermediate tutorial</code> instead of <code>cram_bullet_world_tutorial</code>.
 
Now, let's customize it so that it refers to <code>cram_my_intermediate tutorial</code> instead of <code>cram_bullet_world_tutorial</code>.
  
Rename <code>cram-bullet-world-tutorial.asd</code> to <code>cram-my-intermediate-tutorial</code>
+
Rename <code>cram-bullet-world-tutorial.asd</code> to <code>cram-my-intermediate-tutorial.asd</code>
  
 
  $ mv cram-bullet-world-tutorial.asd cram-my-intermediate-tutorial.asd
 
  $ mv cram-bullet-world-tutorial.asd cram-my-intermediate-tutorial.asd
  
Edit <code>CMakeLists.txt</code> and change <code>project(cram_bullet_world_tutorial)</code> to <code>project(cram_my_intermediate_tutorial)</code>.
+
Edit <code>CMakeLists.txt</code>  
 +
and change <code>project(cram_bullet_world_tutorial)</code> to <code>project(cram_my_intermediate_tutorial)</code>.
  
Edit <code>package.xml</code> and change <code><name>cram_bullet_world_tutorial</name></code> to <code><name>cram-my-intermediate-tutorial</name></code> and <code><description>Tutorial code for the bullet world.</description></code> to <code><description>Tutorial code for the simple mobile manipulation plan</description></code>
+
Edit <code>package.xml</code>  
 +
and change <code><name>cram_bullet_world_tutorial</name></code> to <code><name>cram-my-intermediate-tutorial</name></code>  
 +
and change <code><description>Tutorial code for the bullet world.</description></code> to <code><description>Tutorial code for the simple mobile manipulation plan</description></code>
  
Edit <code>cram-my-intermediate-tutorial.asd</code> and change <code>(defsystem cram-bullet-world-tutorial</code> to <code>(defsystem cram-my-intermediate-tutorial</code>.
+
Edit <code>cram-my-intermediate-tutorial.asd</code>  
 +
and change <code>(defsystem cram-bullet-world-tutorial</code> to <code>(defsystem cram-my-intermediate-tutorial</code>.

Revision as of 04:53, 12 July 2019

This tutorial assumes you have done all of the CRAM Beginner Tutorials.

In this tutorial we will create a CRAM package for the Simple Mobile Manipulation Plan intermediate tutorial. We will do this in the same way as we created a CRAM package for the Beginner Tutorials, by creating a CRAM package and adding the Lisp code for the simple mobile manipulation plan. However, since the mobile manipulation plan is itself based on the Bullet World Demonstration tutorial, after creating the new CRAM package we will first copy the Bullet World Demonstration files and then we will add a new Lisp file for the Mobile Manipulation Plan.

Creating the CRAM Package

Creating the ROS package

Just as with the beginner tutorial, first we need to create a ROS package that depends on cram_language.

In the src subdirectory of your ROS workspace execute the following command:

$ catkin_create_pkg cram_my_intermediate_tutorial cram_language

If you have followed the CRAM installation instructions faithfully, the src subdirectory will be ~/workspace/ros/src:

 ~/workspace/ros/src$ catkin_create_pkg cram_my_intermediate_tutorial cram_language

For the rest of the tutorial, we will leave out the ~/workspace/ros/src.

Copying the Bullet World Demonstration Files

Move the the cram_my_intermediate_tutorial directory:

$ cd cram_my_intermediate_tutorial

The catkin_create_pkg command above creates two files:

CMakeLists.txt
package.xml

We would overwrite these when we copy the Bullet World Demonstration files so let's first take the precaution of changing their names, viz.

$ mv CMakeList.txt CMakeLists.txt.tmp
$ mv package.xml package.txt.tmp

Now, copy the Bullet World Demonstration files:

$ cp -rf ~/workspace/ros/src/cram/cram_tutorials/cram_bullet_world_tutorial/*  .

Now, let's customize it so that it refers to cram_my_intermediate tutorial instead of cram_bullet_world_tutorial.

Rename cram-bullet-world-tutorial.asd to cram-my-intermediate-tutorial.asd

$ mv cram-bullet-world-tutorial.asd cram-my-intermediate-tutorial.asd

Edit CMakeLists.txt and change project(cram_bullet_world_tutorial) to project(cram_my_intermediate_tutorial).

Edit package.xml and change <name>cram_bullet_world_tutorial</name> to <name>cram-my-intermediate-tutorial</name> and change <description>Tutorial code for the bullet world.</description> to <description>Tutorial code for the simple mobile manipulation plan</description>

Edit cram-my-intermediate-tutorial.asd and change (defsystem cram-bullet-world-tutorial to (defsystem cram-my-intermediate-tutorial.