Creating Your Own Carlie Applications
We said that Carlie has been designed to simplify autonomous car research, education and to help facilitate engaging demonstrations. To do this you will want to create your own Carlie applications. There are two ways of interfacing with the Carlie hardware, either via the ROS ecosystem or via the Carlie Python API. The Carlie Python API is available for those who are unfamiliar with the ROS ecosystem and wish to get going without having to learn ROS. However, more capabilities are available by utilising Carlie through the ROS ecosystem.
Carlie Python API
Carlie Python API to come.
Carlie ROS
NOTE: We assume the user is familiar with the ROS and if you have not already read the 3 Levels of Carlie guide we recommend you do that now.
The current Carlie software stack consists of four primary ROS packages, that your ROS-based application may wish to interface with or utilise. These packages are:
- The Carlie Messages - which contains the custom ROS message definitions for Carlie. You will require these if you wish to subscribe or publish to certain topics generated by the Carlie ROS packages.
- The Carlie Hardware Package - which contains the firmware for the low-level micro-controller. The micro-controller firmware publishes several ROS topics, see the Low-Level Layer within the 3 Levesl of Carlie for more details.
- The Carlie Base Package - which contains the scripts for interfacing between the computer and micro-controller, some conversion and filtering nodes and the tools for commanding Carlie. This publishes several topics, see the Base Layer for more details, however the main two topics you will probably be interested in are /carlie/ackermann_cmd/autonomous and /carlie/odom/filtered.
- The Carlie Sensors Package - which contains the ROS launch files for starting the default Carlie sensor suite. You will mainly be utilising this package by including the launch file(s) within the launch file for your own application, or by running the Carlie sensors launch files via the command line prior to launching your application. The Carlie sensors package includes the following launch files:
- carlie_sensors.launch - the main launch file which launches all sensors within the default Carlie sensor suit by including the respective launch file. This also creates static transform publisher from the base link (center of rear axles) to the sensor rig (the 3D printed part which houses the 3 sensors). You can disable the A3 RPLIDAR via the lidar_enabled argument, the rgbd_camera_enabled and pose_camera_enabled arguments can be used to disable the D435 and T265 cameras respectively (default for all three arguments is true, i.e. all sensors are enabled).
- a3_rplidar.launch - launches the Slamtec A3 RPLIDAR and creates a static transform publisher between the LIDAR and the sensor rig. This file is included by the carlie_sensors.launch file, depending on the lidar_enabled argument.
- d435_camera.launch - launches the Intel Realsense D435 RGBD camera and creates a static transform publisher between the camera and the sensor rig. This file is included by the carlie_sensors.launch file, depending on the rgbd_camera_enabled argument.
- t265_camera.launch - launches the Intel Realsense T265 Tracking camera and creates a static transform publisher between the camera and the sensor rig. This file is included by the carlie_sensors.launch file, depending on the pose_camera_enabled argument.
NOTE: Sometimes the realsense cameras do not seem to start up correctly. It is something to do with their internal hardware and software. We are trying to fix this, but currently the only solution is to unplug and replug in the camera that isn't working or ctrl+c
the command and relaunch. To check to see if the D435 RGB-D camera is working (the bottom camera), run the following in another terminal:
rostopic echo --noarr /rgbd_camera/color/image_rect_color
If data/messages start appearing in your terminal, sometimes it takes 1-2 seconds, then the RGB-D camera is good to go. To check the T265 Pose camera (the top cameras), run the following command:
rostopic echo --noarr /pose_camera/odom/sample
If data/messages start appearing in your terminal, sometimes it takes 1-2 seconds, then the Tracking camera is good to go.