Tutorial: Parse a urdf file
The question is: In which directory am I supposed to be during the various steps ?
This question has confused me again and probably made me do some mistakes along the way.
I'm trying to follow the tutorial Parse a urdf file.
Below is a desription on how i guess where to be in the steps of the tutorial.
From the beginning of the tutorial:
$ cd ~/catkin_ws/src
$ catkin_create_pkg testbot_description urdf
$ cd testbot_description
$ mkdir urdf
(well, this is straight forward. Here we are placed in
~/catkin_ws/src/testbot_description creating the subdirectory
~/catkin_ws/src/testbot_description/urdf )
Next step:
cp /path/to/.../testbot_description/urdf/my_robot.urdf .
is a bit confusing since the file "my_robot.urdf" created in the previous tutorial Create your own urdf file was createde in a entirly different directory than indicated in the suggested command since the directory:
~/catkin_ws/src/testbot_description/urdf
did not exist at all at the time.
Next step:
In the next step you are in directory
~/catkin_ws/src/testbot_description/urdf
Now you create a subdirectory "src"
> ~/catkin_ws/src/testbot_description/urdf/src
^^^
^^^
but you create parser.cpp when still being in:
> ~/catkin_ws/src/testbot_description/urdf
^^^^
^^^^
^^^^
but saving parser.cpp into directory
~/catkin_ws/src/testbot_description/urdf/src
(here I think i made a mistake by saving parser.cpp into:
~/catkin_ws/src/testbot_description/urdf I.E. not into:
~/catkin_ws/src/testbot_description/urdf/src )
Next step
I'm quoting:
...First add the following lines to your CMakeList.txt file: ...
This leads to the question: which "CMakeList.txt" ?
Just by following the general tutorial (and rosserial) I have:
~/ros/src/agitr/CMakeLists.txt
~/ros/src/CMakeLists.txt
~/catkin_ws/build/catkin_generated/metapackages/rosserial/CMakeLists.txt
~/catkin_ws/src/beginner_tutorials/CMakeLists.txt
~/catkin_ws/src/CMakeLists.txt
~/catkin_ws/src/rosserial/rosserial/CMakeLists.txt
~/catkin_ws/src/rosserial/rosserial_embeddedlinux/CMakeLists.txt
~/catkin_ws/src/rosserial/rosserial_client/CMakeLists.txt
~/catkin_ws/src/rosserial/rosserial_msgs/CMakeLists.txt
~/catkin_ws/src/rosserial/rosserial_arduino/CMakeLists.txt
~/catkin_ws/src/rosserial/rosserial_xbee/CMakeLists.txt
~/catkin_ws/src/rosserial/rosserial_python/CMakeLists.txt
~/catkin_ws/src/rosserial/rosserial_server/CMakeLists.txt
~/catkin_ws/src/testbot_description/urdf/src/CMakeLists.txt
~/catkin_ws/src/testbot_description/CMakeLists.txt
~/ROStest/build/catkin_generated/metapackages/rosserial/CMakeLists.txt
~/ROStest/src/CMakeLists.txt
~/ROStest/src/rosserial/rosserial/CMakeLists.txt
~/ROStest/src/rosserial/rosserial_embeddedlinux/CMakeLists.txt
~/ROStest/src/rosserial/rosserial_client/CMakeLists.txt
~/ROStest/src/rosserial/rosserial_msgs/CMakeLists.txt
~/ROStest/src/rosserial/rosserial_arduino/CMakeLists.txt
~/ROStest/src/rosserial/rosserial_xbee/CMakeLists.txt
~/ROStest/src/rosserial/rosserial_python/CMakeLists.txt
~/ROStest/src/rosserial/rosserial_server/CMakeLists.txt
I guess it's either of these two:
~/catkin_ws/src/testbot_description/urdf/src/CMakeLists.txt
~/catkin_ws/src/testbot_description/CMakeLists.txt
Most probably
~/catkin_ws/src/testbot_description/CMakeLists.txt
since the other CMakeLists.txt has the following text at the top:
"#toplevel CMakeLists.txt for a catkin workspace"
Next step
I asume where still in directory:
~/catkin_ws/src/testbot_description/urdf
so running catkin_make yields as follows:
~/catkin_ws/src/testbot_description/urdf$
~/catkin_ws/src/testbot_description/urdf$
~/catkin_ws/src/testbot_description/urdf$ catkin_make
Base path: ~/catkin_ws/src/testbot_description/urdf
Source space: ~/catkin_ws/src/testbot_description/urdf/src
Build space: ~/catkin_ws/src/testbot_description/urdf/build
Devel ...