Wheelchair Simulation repository for the subject "Projeto de Sistemas Mecatrônicos (ES965)", taught in the Automation and Control Engeenireing course at UNICAMP, Brazil.
This project contains a embeeded arduino code to read inputs from a joystick and stream data trough Serial. A ROS2 node read this data and publish it to a topic. Another control node subscribed to this topic process the data simulating a PWM converter, H-Bridge and PMDC motor and publishs a /cmd_vel topic with target speed and angular velocity to robot.
On Gazebo, a wheelchair model buit on top of diff_drive plugin subscribes to /cmd_vel topic and move accordingly to the reference, taking in consideration physical aspects, like: gravity, damping, friction, kinematics, inertia, etc.
PlotJuggler is also used to subscribe to some topics and display Real-Time metrics from the simulation.
To deploy embeeded code, the recommendede approach is to use PlataformIO IDE framework.
All the used tools are encapsulated with Docker containers. It is necessary to give root user access to X server in order to enable GUIs visualizations on containerized environment.
git clone https://github.com/lucas-vecina/wheelchair-sim
cd wheelchair-sim/ros
xhost +local:rootTo build and run ROS2 ecossystem with ROS, Gazebo and PlotJuggler, is necessary Docker. Build and run with docker compose.
docker compose up --build