Difference between revisions of "DonkeyCar for JetRacer ROS Tutorial III: Web Control"

From Waveshare Wiki
Jump to: navigation, search
(Created page with "==WEB Control== *Open the terminal in Jetson Nano and run the following command <pre> jetson@jetson:~$ source ~/env/bin/activate (env) jetson@jetson:~$ cd mycar/ (env) jetson@...")
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 +
<div class="wiki-pages jet-green-color">
 +
==DonkeyCar for JetRacer ROS Tutorial==
 +
*[https://www.waveshare.com/wiki/DonkeyCar_for_JetRacer_ROS_Tutorial_I:_Install_Jetson_Nano DonkeyCar for JetRacer ROS Tutorial I: Install Jetson Nano]
 +
*[https://www.waveshare.com/wiki/DonkeyCar_for_JetRacer_ROS_Tutorial_II:_Setup_Linux_PC DonkeyCar for JetRacer ROS Tutorial II: Setup Linux PC]
 +
*[https://www.waveshare.com/wiki/DonkeyCar_for_JetRacer_ROS_Tutorial_III:_Web_Control DonkeyCar for JetRacer ROS Tutorial III: Web Control]
 +
*[https://www.waveshare.com/wiki/DonkeyCar_for_JetRacer_ROS_Tutorial_IV:_Joystick_Control DonkeyCar for JetRacer ROS Tutorial IV: Joystick Control]
 +
*[https://www.waveshare.com/wiki/DonkeyCar_for_JetRacer_ROS_Tutorial_V:_Collect_Data DonkeyCar for JetRacer ROS Tutorial V: Collect Data]
 +
*[https://www.waveshare.com/wiki/DonkeyCar_for_JetRacer_ROS_Tutorial_VI:_Training_Data DonkeyCar for JetRacer ROS Tutorial VI: Training Data]
 +
*[https://www.waveshare.com/wiki/DonkeyCar_for_JetRacer_ROS_Tutorial_VII:_Autonomous_Driving DonkeyCar for JetRacer ROS Tutorial VII: Autonomous Driving]
 
==WEB Control==
 
==WEB Control==
 
*Open the terminal in Jetson Nano and run the following command
 
*Open the terminal in Jetson Nano and run the following command

Latest revision as of 08:55, 8 November 2022

DonkeyCar for JetRacer ROS Tutorial

WEB Control

  • Open the terminal in Jetson Nano and run the following command
jetson@jetson:~$ source ~/env/bin/activate
(env) jetson@jetson:~$ cd mycar/
(env) jetson@jetson:~/mycar$ python manage.py drive

Web Control01.png

  • Note: Do not add "sudo" before python "manage.py drive", otherwise it will fail to run.
  • Enter "http://<jetson_ip_address>:8887" in your browser bar to connect the WEB control interface of the car. Note that you should delete "<>" after entering "jetson_ip_address", otherwise it will fail to display.

Web control02.png

  • Choose the max velocity of the car in Max Throttle, and 30% is recommended.
  • Right-click the joystick window and drag it to control the car's movement.
  • Angle & Throttle displays the current steering angle and the motor speed of the rear wheel." Start Recording" key can the collecting data from the images taken by the car. The pictures taken are saved under the directory of "~/mycar/data"
  • On the mobile phone, open http://<jetbot_ip_address>:8887 with a browser, click start Vehicle, and you can use the mobile phone to control the car to move.

Web control03.png

  • It is recommended to open it with Firefox or Google Chrome, other browsers may have some functions that are not available.
  • Option Description
    • start Recording : Start recording image, steering angle and throttle value by recording data.
    • Throttle mode - Option to set throttle to constant. Set to constant mode throttle will be max uncontrollable.
    • Pilot mode - Select the control mode mode, manual control, steering automatic control or fully automatic control.
    • Max throttle - Choose the maximum throttle.
  • The car can be controlled by the keyboard
    • Spacebar : stop moving or recording
    • R : control recording
    • I : increase forward speed
    • K : Decrease forward speed
    • J : turn left
    • L : turn right