This repository contains the source code of the computation of the odometry of a 4-wheel autonomous vehicle.
CMakeList.txtthis file contains a description of the project's source files and targetsinfo.txt thisfile contrains the registration number, name, last name of the authorspackage.xmlthis file contains a collection of metadata componentslaunch/project.launchthis launch file sets the values of node parameters and synchronizes the simulation time with the /clock topicmsg/Odom.msgthis file defines the custom odometry message Odomsrc/odom_node.cppthis executable contains the code of the initialization of the node, of the declaration and instantiation of the subscriber, service, publishers and transform broadcaster, and of the computation of the odometry and transformsrv/ResetOdom.srvthis file defines the service to reset the odometry
Prerequisites:
- Linux environment
- ROS noetic
- ROS Publisher on the
/speed_steertopic or ROS Bag file
Steps:
- unzip the tar.gz file
- start
roscore - run
roslaunch first_project project.launchin the command line
Upon reading a new Quaternion message, containing speed (m/s) and steering angle (rad), from the /speed_steer topic:
- custom odometry message (x, y, theta, timestamp):
- the custom odometry message is computed assuming an Ackerman Steering model approximated to a bicycle, using 2nd order Runge-Kutta integration
- the custom odometry message is published
- regular odometry message (Pose, Twist):
- the regular odometry message (Pose, Twist) is computed
- the regular odometry message is published
- transform (base frame -> moving frame):
- the transform is comuted
- the transform is broadcasted