Motor control card driver
Apply motor regulation on left and right motor using a PID regulator.
Setpoint are read from the /cmd_vel
topic.
This node also send back odometry and transform of the base_link
.
Setup repository
This repository uses git submodules. To clone this repository with all its submodules, proceed like so:
git clone --recurse-submodules -j8 https://gitlab.clubelek.fr/cdf2020/microcontrollers/motors-control-card/motors-control-card-driver.git
Update submodules
If you want to fetch the changes for the submodules, use the command git submodule update
Prerequisites
ROS Install
- Install a version of ROS1, see ROS installation.
- Install rosserial-python for your ROS distribution, for example:
sudo apt-get install ros-noetic-rossserial-python
Hardware preparation
Add the rules to read/write to the STM32 Nucleo F303k8
sudo cp 99-stm-nucleo.rules /etc/udev/rules.d/
How to run
pio run --target upload
In one terminal, source ROS setup file and run the roscore:
source /opt/ros/noetic/setup.bash
roscore
In another terminal, run rosserial-python to handle the STM32 node:
source /opt/ros/noetic/setup.bash
rosrun rosserial_python serial_node.py /dev/ttyACM0