/notebook/deprecated/ros/06-0-create-a-new-package

Creating a new package


Create a new package

```bash
cd ~/code/code_idealab_ros/src/
catkin_create_pkg thorlabs_linear_actuator std_msgs rospy roscpp
cd ~/code/code_idealab_ros/
catkin_make
```
  1. Find package dependencies:

    ```bash

    one level

    rospack depends1 thorlabs_linear_actuator

    all levels

    rospack depends thorlabs_linear_actuator ```

  2. Open up package manifest:

    bash cd ~/code/code_idealab_ros/src/thorlabs_linear_actuator/ gedit package.xml

  3. Add description, clean up and remove comments. It should look like this when done

    ```

    thorlabs_linear_actuator 0.0.1 The thorlabs_linear_actuator package

    idealab MIT http://idealab.asu.edu Dan Aukes

    catkin

    roscpp rospy std_msgs

    roscpp rospy std_msgs

    roscpp rospy std_msgs

    ```

  4. Make

    ```bash cd ~/code/code_idealab_ros/ catkin_make -DPYTHON_EXECUTABLE=/usr/bin/python3

    catkin_make install # (optionally)

    make one thing

    catkin_make --source my_src

    catkin_make install --source my_src # (optionally)

    ```

About

I am an engineer and educator, having spent ten years as a professor. My goal is to help you build your knowledge of design and technology, get your hardware working, and propel your startup or small business. Get in touch!