To start you will need to clone the carlie_hw repository to a suitable location.
cd <desired_location> && git clone https://github.com/RoboticVisionOrg/carlie_hw.git
cd <path>/carlie_hw
git checkout -b <branch_name>
Navigate into the cloned carlie_hw package and run the ArduinoLibrarySymlinkSetup.sh
script. This will create a symbolic link between the folders located in <path>/carlie_hw/src/libraries
within ~/Arduino/libraries/
folder. This is required so the Arduino IDE can find the carlie, sc_servo and vesc_uart source files.
Now compile all ROS messages into a library that the Arduino software can use. To do this perform the following:
cd ~/Arduino/libraries
rm -rf ros_lib
rosrun rosserial_arduino make_libraries.py ~/Arduino/libraries
Modify the carlie, sc_servo or vesc_uart library source files and recompile the firmware and calibration hex files. This can be done by:
<path>/carlie_hw/src/firmware/firmware.ino
or <path>/carlie_hw/src/calibration/calibration.ino
file in the Arduino IDEOnce the compiled software has been successfully tested, you will need to copy the compiled hex file into the release folder. To do this follow these steps:
firmware.ino
or calibration.ino
file in the Arduino IDE and compile the software."../tools/teensy_post_comile" ... "-path=/tmp/arduino_build_<number>" ...
, example shown in the figure below. We will use the path portion in the next step.<filename>.ino.hex
file from the path found in the previous step into <path>/carlie_hw/release/firmware.hex
or <path>/carlie_hw/release/calibration.hex
. For example, run the command cp /tmp/arduino_build_<number>/firmware.ino.hex <path>/carlie_hw/release/firmware.hex
Altering the Carlie Base package is typically straight forward, however if you alter the config_node, driver_node or power_monitor_node you may need to update the micro-controller firmware.
src
folder of your ROS catkin workspace, cd <catkin_ws>/src/ && git clone https://github.com/RoboticVisionOrg/carlie_base.git
git checkout -b <branch_name>
cd <catkin_ws> && catkin_make
rospack profile
to ensure ROS will default to the newly cloned repository and not the carlie_base package within /opt/ros/<distro>/
cd <catkin_ws>/src/carlie_base
When altering the Carlie Sensors package please follow the procedure below.
src
folder of your ROS catkin workspace, cd <catkin_ws>/src/ && git clone https://github.com/RoboticVisionOrg/carlie_sensors.git
cd <catkin_ws> && catkin_make
rospack profile
to ensure ROS will default to the newly cloned repository and not the carlie_sensors package within /opt/ros/<distro>/
cd <catkin_ws>/src/carlie_sensors
git checkout -b <branch_name>
Once you have developed your Carlie Appplication you may wish to include it within the Official Carlie Apps package. To do this you will be required to write some documentation that explains what your application does, how to run it and any requirements, for example additional sensors required or additional libraries that need to be installed. You can also create a web interface to make your application launchable via a web browser. To include your application within the official set perform the following:
src
folder of your ROS catkin workspace, cd <catkin_ws>/src/ && git clone https://github.com/RoboticVisionOrg/carlie_apps.git
cd <catkin_ws> && catkin_make
rospack profile
to ensure ROS will default to the newly cloned repository and not the carlie_apps package within /opt/ros/<distro>/
cd <catkin_ws>/src/carlie_apps
<catkin_ws>/src/carlie_aps/
. Depending if you copy, or move, your ROS package, as well if it is in the same catkin workspace, you may need to change the name of your ROS package within the CMakeLists.txt and package.xml files. We recommend prepending the package with carlie_, for example my_demo would become carlie_my_demo.cd <catkin_ws> && catkin_make
. Make sure the catkin_make build process is successful.roslaunch carlie_my_demo demo.launch
Once you have copied your application into the carlie_apps directory and successfully ran your application, we can start creating the web interface if you wish. To create a web interface follow the steps below. You will need to be familiar with, or willing to learn, HTML, Javascript, CSS and the ROSlib javascript API. However, you can use the existing applications with web interfaces as examples.
websocket_on
with a default value of false, for example <arg name="websocket_on" default="false" />
<include file="$(find rosbridge_server)/launch/rosbridge_websocket.launch" if="$(arg websocket_on)" />
.<path>/carlie_apps/hsv_blob_following_demo/module.yml
file into your application package, for example <path>/carlie_apps/<your_application>/module.yml
. Modify the copied module.yml file to suit your application.<path>/carlie_apps/hsv_blob_following_demo/html
folder into your application package, for example <path>/carlie_apps/<your_application>/html
. Modify the contents of the html folder, mainly the index.html file, to suit your application.<path>/carlie_apps/hsv_blob_following_demo/debian
folder into your application package, for example <path>/carlie_apps/<your_application>/debian
./reload
to reload modules, for example /http://192.255.255.88/reload
.Once you have tested your application successfully, by both command line launching and web interface launching if applicable, write a README.md with documentation explaining what your application does, how to run it and any requirements, for example additional sensors required or additional libraries that need to be installed. Once this documentation has been written submit a pull request.