Basic Packages (AutoNOMOS Model v3.1) - AutoModelCar/AutoModelCarWiki GitHub Wiki
The computer in the model car contains preinstalled packages which can help you to develop your own code. They consist of sensor- and actuator nodes.

Figure 1: Basic ROS Packages preinstalled in the car.
Updating the packages
To update to the newest version of the packages, download the debian package from: modelcar-basic-packages.deb (amd64) and modelcar-basic-packages.deb (armhf)
Copy the file to the model car and install it with:
$ dpkg -i modelcar-basic-packages.deb
Make sure in the .bashrc you are sourcing the correct setup.bash file (any catkin workspace in the /root/ directory has to source it before the first build):
source /opt/ros/modelcar/catkin_ws/install/setup.bash
The purpose of the packages should be apparent from their names. In the next sections we review each one of them.
============================================
Rplidar_ros
rplidarNode is a driver for RPLIDAR. It reads RPLIDAR raw scan result using RPLIDAR's SDK and converts them to ROSLaserScan messages.
Published Topics
scan (sensor_msgs/LaserScan) it publishes scan topic from the laser
Services
stop_motor(std_srvs/Empty)
start_motor (std_srvs/Empty)
Parameters
serial_port (string,default: /dev/ttyLidar) serial port name used in your system.
serial_baudrate (int, default: 115200) serial port baud rate.
frame_id (string, default: laser) frame ID for the device
inverted (bool, default: false) indicates if the LIDAR is mounted inverted.
angle_compensate (bool, default: true) indicates if the driver needs to do angle compensation.
Device Settings
Once you have changed the USB port remap, you can change the launch file with the serial_port value.
<param name="serial_port" type="string" value="/dev/ttyLidar"/>
Launch File Examples
Start a rplidarNode and view the scan result in using “rostopic echo scan”.
$ roslaunch rplidar_ros rplidar.launch
============================================
Rosserial
Rosserial provides the communication with the Arduino board. It handles publishing and subscribing to messages from the Arduino. Rosserial is meant to be used together with the version-3-rosserial branch of the arduino nano software.
LED Commands
string Light
____________________________________________
Lle Blinking yellow left
Lri Blinking yellow right
Lstop Turn on the three red tail lights (braking)
Lpa Turn on the two red back lights, and two white front lights
Lta Turn on the two red back lights, and two white front lights
Lre Turn on the white lights at the back for going backwards.
Lfr Turn on the two white headlights for driving at night
LdiL Turnoff the lights
Subscribed Topics
/steering (std_msgs/UInt8) .
/led (std_msgs/String)
/speed (std_msgs/Int16)
Published Topics
/yaw (std_msgs/Float32)
/roll (std_msgs/Float32)
/pitch (std_msgs/Float32)
/twist (geometry_msgs/Twist)
/steering_angle (std_msgs/UInt16)
Launch File Examples
$ roslaunch manual_constrol rosserial.launch
$ rostopic pub -r 1 /steering std_msgs/UInt8 '{data: 30}'
$ rostopic pub -r 1 /manual_control/speed std_msgs/Int16 '{data: 500}'
$ rostopic pub -r 1 /led std_msgs/String '{data: Lle}'
$ rostopic echo /yaw
$ rostopic echo /roll
$ rostopic echo /pitch
$ rostopic echo /twist
$ rostopic echo /steering_angle
============================================
usb_cam
The usb_cam_node interfaces with standard USB cameras (e.g. the fish-eye camera) using libusb_cam and publishes images as sensor_msgs::Image. Uses the image_transport library to allow compressed image transport.
Publisher Topics
usb_cam/image_raw
Parameters
The camera name. This must match the name in the camera calibration
~camera_name (string, default: head_camera)
You should use camera_calibration package of ROS to calibrate the camera for further use.
Launch File Examples
Start usb_cam node to publish the image_raw topic.
$ roslaunch manual_control fish_eye_camera.launch
Hints:
to use the usb_cam ,
-
Put the usb_cam package inside your workspace
-
Delete the remapping line in the launch file (usb_cam/launch/usb_cam-test.launch) :
<remap from="usb_cam/image_raw" to="app/camera/rgb/image_raw" /> -
Find the port of USB (/dev/video?) of fish eye camera and modify the launch file based on:
<param name="video_device" value="/dev/usb_cam" />
============================================
Realsense_camera
This package contains launch files for using the Intel RealSense camera device.
Launch File Examples
Start realsense_sr300 node to start the intel sr300 camera.
$ roslaunch manual_control sr300.launch.launch
make sure there is not any nodelet with the same name running on the odroid, to stop the nodelet you can find the id of nodelet using "pgrep nodelet" and then kill it "pkill nodelet" in the model car.
$ pkill nodelet
$ pkill rosmaster
============================================
map_publisher
This package contains launch files for using ROS' map publisher. It contains a map of our lab and should be adjusted to your map. The launch file tells the map publisher which .yaml file to use. A example .yaml file can be found inside the map folder. You can adjust this .yaml file and add your map.
============================================
web_server
The web_server provides a web control center for inspecting, subscribing and publishing to the robot. Its documentation can be found here.