필터 지우기
필터 지우기

Matlab to control jetracer(jetson nano tx1) motor.

조회 수: 5 (최근 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