Skip to content
Serkan Mazlum edited this page Aug 11, 2024 · 3 revisions

Setup

  • Adding Packages to the System
cd Vehicle-Control-Sotfware

source /opt/ros/humble/setup.bash
source install/setup.bash  # Instead of source, . can also be used.
  • To avoid entering the source ~/Vehicle-Control-Sotfware/install/setup.bash command every time a new terminal is opened, these commands are written to the ~/.bashrc file.
echo "source /opt/ros/humble/setup.bash" >> ~/.bashrc
echo "source .../Vehicle-Control-Sotfware/install/setup.bash >> ~/.bashrc

Running the Packages

  • Instead of running each code individually, the launch file is executed.
ros2 launch vehicle_control_software drive_launch.py
  • If files are to be launched individually, the path to the params file should be provided during the launch.
ros2 run commander commander_node  --ros-args --params-file /home/${USER}/Vehicle-Control-Sotfware/src/modules/vehicle_control_software/config/params.yml
  • The control method is specified in the control_unit variable in the params file to control the vehicle. By default, it is set to keyboard control. If desired, it can also be controlled using a joystick or an ESP8266.
  1. Keyboard controls are as follows
    w
a   s   d   
    x
  1. Joystick control: Control is achieved using the left joystick.
  2. ESP8266 control: Joy data is sent to the computer's serial port via an interface prepared using RemoteXY.
    • To connect to the ESP8266 board, it is necessary to write the port to which the board is connected in the file_name variable in the params file. By default, it is /dev/ttyUSB0

    • The RemoteXY application is downloaded to the phone, and to connect to the access point broadcasted by ESP8266, you connect to joy in the Wi-Fi section. The password is 135798642.

    • Arduino Code nodemcu_esp8266.ino

remotexy

Clone this wiki locally