So, I have read the tutorial here: http://dev.ardupilot.com/wiki/code-overview-adding-a-new-mavlink-message/
I have successfully set up the .xml file and generated the .h file, but I am confused about what exactly I should do in the main vehicle code to send it. Since it is just a custom message, any sketchy but working solution is fine.
Also, since I am trying to send the data from a custom made lidar back to an onboard raspberry pi, how to make sure that I send the message at at least 20hz or something? Looking at the output of the raw Mavlink messages already existed (via Dronekit), they seem to be sent at a much lower rate than 20hz.