Matlab to control jetracer(jetson nano tx1) motor.

14 ビュー (過去 30 日間)
MD LIMON APU
MD LIMON APU 2024 年 1 月 23 日
回答済み: Ayush 2024 年 2 月 5 日
Hello community, i am doing a project with jetracer line following which is based on jetson nano tx1. My matlab version is 2021b. And i use jetson obj function to connect the matlab to jetracer. Now i want to control my jetracer to move forward using matlab function. I have no experience on that. I found the jetson function can write and read the digital pin. Will it can give command to move the motor forward. Which will be a easier option to control my motor with matlab. Any idea will be helpful for me. Thank you

採用された回答

Ayush
Ayush 2024 年 2 月 5 日
Hello MD LIMON,
To control the motor of your JetRacer based on the jetson nano tx1 using MATLAB R2021b you would have to leverage the “jetson” object function and its additional capabilities. Please refer to the documentation below to know more about the “jetson” object function:
Building on top of your suggestion, you could use the “Object Functions” to control the motor of the JetRacer and enable it to move forward. One possible workaround can be referenced from the below linked repository and wiki pages about an example for the JetRacer.
According to the aforementioned documentation, “car.steering = 0” means the car would move forward and in turn the motor. To access this line of code, you can try leveraging a combination of the following object functions i.e.” getPILPort”, setPILPort”, “openShell” and “runExecutable” to understand the file system of the connected jetson hardware and using the “writeDigitalPin” function to write to the configured GPIO pin of the jetson nano to transmit the signal to move forward. Please refer to the below documentation to know more about the object functions of the “jetson” object:
Hope it helps!

その他の回答 (0 件)

製品


リリース

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by