This is my note for learning ROS (Robot Operating System).

It is just some step I used to create Catkin Workspace and, then, I followed the tutorial in ros.org to create the URDF package of PMC 6-axis robot arm.
In the following video, I use RViz to demonstrate the virtual robot arm of the URDF package I created.

Here is the note also published in gist:

Assume you already install ROS

  • Frist create package and add urdf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
$ mkdir catkin_ws_PMCurdf
$ cd catkin_ws_PMCurdf/
$ mkdir src
$ cd src/
$ catkin_init_workspace
$ cd ..
$ catkin_make
$ source devel/setup.bash
$ rospack list
$ rospack find package:
$ cd src
$ catkin_create_pkg PMC6dof_urdf
$ cd PMC6dof_urdf/
$ rospack find PMC6dof_urdf
# add urdf file and mesh file into urdf & mesh folder
$ rospack find PMC6dof_urdf # will show you location of folder
$ roslaunch urdf_tutorial display.launch model:=`rospack find PMC6dof_urdf`/urdf/PMC_6dof.urdf gui:=true
# will show up robot arm in rviz with fake FK control panel
  • reuse pack

Because my own pack is not default in rospack list, need to add every time
you open a new terminal (may set a script in bash)

1
2
3
4
$ cd workspace/catkin_ws_PMCurdf/
$ source devel/setup.bash
$ rospack find PMC6dof_urdf
$ roslaunch urdf_tutorial display.launch model:=`rospack find PMC6dof_urdf`/urdf/PMC_6dof.urdf gui:=true

note: if you want to reuse in different computers, need to rebuild the source before doing the above step.

1
2
3
$ cd workspace/catkin_ws_PMCurdf/
$ rm -r devel/ build/ # remove old compiled data.
$ catkin_make # make sure `src/` is the same folder.