Type | Description |
---|---|
C | Four-wheel drive with robot arm |
The image in this repository pros_car
is deprecated. Use pros_ai_image
instead.
The Dockerfile here is to test new feature based on ghcr.io/otischung/pros_ai_image:latest
.
The docker image in this project has the following 4 features shown above.
Keyboard
Car_<A,B,C,D>_serial_reader
Car_<A,B,C,D>_serial_writer
arm_reader
arm_writer
pros_app contains the following features.
RPLidar
Camera
SLAM
pros_AI contains Car_B_AI
.
pros_AI_image is the repository which creates the entire base docker image.
We've written the car_control.sh
shell script to run the image.
These environment variables are defined in .env
.
You may change the ID number to divide other ROS environments.
export ROS_DOMAIN_ID=1
You can change the speed of your car via the Linux environment variable WHEEL_SPEED
using the unit rad/s.
export WHEEL_SPEED=3
Dockerfile
- You may change the ID number to divide other ROS environments.
ENV ROS_DOMAIN_ID=1
Car<A~D>_serial_writer.py
- Send the signals to jetson orin nano, receive the signals from
Car<A~D>_keyboard.py
.
- Send the signals to jetson orin nano, receive the signals from
Car<A~D>_keyboard.py
- Send the signal to
Car<A~D>_serial_writer.py
, intarget_vel
, index 0 is the left wheel, index 1 is the right wheel. - If the car type is four-wheel drive, we have two lists, one contains
self._vel
andself._vel2
and the other containsself._vel3
andself._vel4
.
# two wheels:
target_vel = [self._vel, self._vel]
# four wheels
target_vel = [self._vel, self._vel2]
target_vel = [self._vel3, self._vel4]
# These two target velocities are sent through different topics
-
env.py
- When we set the USB port, if we run
Car<A~D>_serial_writer.py
and the terminal shows that “cannot find the desired USB port”, then you have to edit this script or check out the USB port on the car device. - You can run
ls /dev/ttyUSB*
to check your USB port number. (if there doesn’t appear any USB devices, you must exit docker, and check the USB port on the car,ttyUSB<0~3>
number depends on the inserted order) - We've defined the name of the soft link for
usb_front_wheel
,usb_rear_wheel
, andusb_lidar
in pros_app. You may also use these rules in this container. - Referene
- When we set the USB port, if we run
-
car_models.py
- For all received data-class types, which the behavior is like
struct
inC/C++
.
- For all received data-class types, which the behavior is like
-
Run the car (open two terminals)
- Use
w a s d
or other keys to control the car. - Press
z
to stop the car.- Note: The car will always go forward and then stop slowly in any case. This is a bug in the C++ program controlling the ESP32.
- Press
q
to exit thekeyboard.py
.
ros2 run pros_car_py car<A~D>_serial_writer.py
ros2 run pros_car_py car<A~D>_keyboard.py
- Use