Welcome to RDK X5 Robot repository
3.Set the car type
Set the base car type
3.1. Statement
Since the ROS driver board is compatible with multiple car types, the default is not sunriseRobot car type when it leaves the factory, so it needs to be set to sunriseRobot type before it can be used, otherwise there will be abnormal control problems.
From the driver library, you can know that sunriseRobot type ID = 6.

If the factory image of the RDK-X5-Robot car is used, the APP program that starts automatically at boot will automatically set the car type to sunriseRobot type, so after starting the APP control program with the factory image, the car type will be automatically set to the sunrise car type. Running the ROS routine will also automatically set the car type to the sunrise car type.
To manually set the car type, please refer to the following example:
3.2, Set and read the car type
Source code path: /home/sunrise/sunriseRobot/Samples/1_Basic/2_set_cartype.ipynb
Open jupyterlab, find and run the program to see the effect.
Set the car type to 6. After the ROS expansion board receives this command, it will save this parameter and remember this parameter the next time it is turned on.
xxxxxxxxxx# Set the car type to sunriseRobotbot.set_car_type(6)
Read the car type. If the type value = 6 is read, the setting is complete.
xxxxxxxxxxcar_type = bot.get_car_type_from_machine()print(car_type)