This project is to use SolidWorks to model a simple steerable car and control it in gazebo simulator.
The CAD model is exported into urdf files by using the sw_urdf tool. The urdf files is parsible by gazebo. After adding the transmission properties and controller configurations for the interface of ros-controller. The robot can be simulated in gazebo and be controlled through several joints and velocity commands.
├── config (controllers setting)
├── launch
├── meshes
├── rviz (rviz setting)
├── scripts (executable python scripts)
├── textures
├── urdf
└── worlds
Ubuntu 18.04
ROS Melodic
Clone the ROS Package and Gazebo Plugin at src folder in the ROS workspace
cd catkin_ws/src
ros-control
ros-controller
sudo apt-get install ros-melodic-ros-control ros-melodic-ros-controllers
joint_state_publisher (for rviz only)
git clone https://github.com/ros/joint_state_publisher.git
roboticsgroup_upatras_gazebo_plugins
git clone https://github.com/roboticsgroup/roboticsgroup_upatras_gazebo_plugins.git
This plugin is for mimicking different joinst value
pip3 install getch
pip3 install rospkg
getch is for receiving user keyboard input
cd catkin_ws
catkin_make -DPYTHON_EXECUTABLE=/usr/bin/python3
source devel/setup.bash
roslaunch newbot2 gazebo_rviz.launch
roslaunch newbot2 gazebo.launch
roslaunch newbot2 display.launch
cd to scripts folder
roscd newbot2/scripts
Use keys to control the robot.
w is for forwarding, x is backward, a turns left, d turns right, s stop and reset
w
a s d
x
python3 teleop.py
Command the robot to drive in a circle and receive the command from the topic.
python3 talker.py
python3 listener.py
BSD