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:

    # one level
    rospack depends1 thorlabs_linear_actuator
    #all levels
    rospack depends thorlabs_linear_actuator
    
  2. Open up package manifest:

    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

    <?xml version="1.0"?>
    <package format="2">
    
      <name>thorlabs_linear_actuator</name>
      <version>0.0.1</version>
      <description>The thorlabs_linear_actuator package</description>
    
      <maintainer email="danaukes@gmail.com">idealab</maintainer>
      <license>MIT</license>
      <url type="website">http://idealab.asu.edu</url>
      <author email="danaukes@asu.edu">Dan Aukes</author>
    
      <buildtool_depend>catkin</buildtool_depend>
    
      <build_depend>roscpp</build_depend>
      <build_depend>rospy</build_depend>
      <build_depend>std_msgs</build_depend>
    
      <build_export_depend>roscpp</build_export_depend>
      <build_export_depend>rospy</build_export_depend>
      <build_export_depend>std_msgs</build_export_depend>
    
      <exec_depend>roscpp</exec_depend>
      <exec_depend>rospy</exec_depend>
      <exec_depend>std_msgs</exec_depend>
    
    
      <export>
      </export>
    
    </package>
    
  4. Make

    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)