$ scripts/install
$ scripts/build --port /path/to/serial --build-ros [--sender | --receiver]
You need to specify either --sender or --receiver to indicate which code to upload. The port value needs to be path to the serial port
Read https://github.com/arduino/Arduino/blob/master/build/shared/manpage.adoc to compile in command line