vrep:create-rc-car-robot
Differences
This shows you the differences between two versions of the page.
— | vrep:create-rc-car-robot [2023/03/31 12:14] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | Back to [[vrep: | ||
+ | |||
+ | We start from an Inventor CAD file off an RC car that we want to use as a cheap autonomous robot for educational purpose: | ||
+ | |||
+ | - Convert the CAD file to a format importable in V-REP | ||
+ | - Simplify the CAD to create the dynamic model | ||
+ | - Make dynamic model more realistic | ||
+ | - Add the CAD parts | ||
+ | - Program the ROS Interface | ||
+ | - Test | ||
+ | - Build the track | ||
+ | - Test again | ||
+ | |||
+ | The original CAD file of the RC car has been made on Inventor. It has been converted to a bunch of STL files, one for each part. As we will have to define ourselves the links in V-REP when building the dynamical model, we do not need to use the links defined in Inventor. | ||
+ | |||
+ | The dynamic model of the car is quite realistic, it models the steering bar and the gears between the motor and the rear wheels axis. | ||
+ | {{ : | ||
+ | |||
+ | The V-REP file with only the dynamic model can be found here [[https:// | ||
+ | |||
+ | We take all the parts from the CAD file and we import them as static objects in V-REP. Thanks to Jules' | ||
+ | {{ : | ||
+ | |||
+ | The V-REP file is here [[https:// | ||
+ | |||
+ | Now we can test that the car can be controlled by ROS. After starting **roscore**, | ||
+ | * / | ||
+ | * / | ||
+ | |||
+ | Here are some examples of commands : | ||
+ | <code bash> | ||
+ | rostopic pub -1 / | ||
+ | rostopic pub -1 / | ||
+ | </ | ||
+ | |||
+ | The last file is the full V-REP file with the track : [[https:// | ||
+ | The track can be built and modified using Blender as explained[[blender: | ||
+ | {{ : | ||
+ | |||
+ | To import the track created by Blender in V-REP : | ||
+ | * export the track from Blender using Wavefront (.obj) format, the exported file can be called create_track_bezier.obj | ||
+ | * open a scene file with the RC car in V-REP (e.g. [[https:// | ||
+ | * import create_track_bezier.obj using File-> | ||
+ | * (optional) rename " | ||
+ | * remove the default floor " | ||
+ | * select the " | ||
+ | * select the " | ||
+ | * in the property window, click on " | ||
+ | * you can add 45x45 meters green plane (add primitive shapes) and place it 10 cm below the track to have a background. If you have enough CPU power you can leave this green plane " | ||
+ | * if the car is not correctly oriented in the direction of the track, select " | ||
+ | * start the simulation in V-REP (make sure roscore was running before starting V-REP) | ||
+ | |||
+ | |||
+ | ToDo : create a collision form from the car body, now the collision is only done with the hidden elements of the dynamic model, it is OK for the wheels but not for the body of the car. | ||
+ | |||
+ | Back to [[vrep: | ||