![]() |
|
|---|---|
| F1TENTH within OptiTrack Motion Capture Area | F1TENTH with 4 X-Base Passive Reflective Markers |
| OptiTrack Mo-Cap Ground Plane Setup | OptiTrack Mo-Cap Asset (Vehicle) Setup |
![]() |
|---|
| OptiTrack Mo-Cap System Setup, Calibration and ROS Integration Tutorial Video |
- Clone this repository.
$ git clone https://github.com/Tinker-Twins/F1TENTH-Mocap-Data-Recording-Pipeline.git
- Move the
autodriveandf1tenthdirectories from theVehicle Softwaredirectory to the source space (src) of the Catkin workspace on the vehicle computer.$ mv ~/Vehicle\ Software/autodrive ~/catkin_ws/src/ $ mv ~/Vehicle\ Software/f1tenth ~/catkin_ws/src/
- Build the packages.
$ cd ~/catkin_ws $ catkin_make
- Source the
setup.bashand/or.bashrcas needed.$ source ~/catkin_ws/devel/setup.bash $ source ~/.bashrc
-
Install
mocap_optitrackROS package:$ sudo apt-get install ros-<distro>-mocap-optitrack
References:
http://wiki.ros.org/mocap_optitrack
https://tuw-cpsg.github.io/tutorials/optitrack-and-ros/ -
Source the
setup.bashand/or.bashrcas needed.$ source /opt/ros/<distro>/setup.bash $ source ~/.bashrc
Note: There may be a need to clone and build vehicle packages on the remote PC connected to OptiTrack Mocap system as well, so that any custom message definitions are compiled and recorded to the bag file.
-
[Terminal Window 1] Mocap Bringup: Launch the
mocap.launchfile frommocap_optitrackpackage on remote PC.$ roslaunch mocap_optitrack mocap.launch & rosrun rviz rvizNote:
F1TENTH_Mocap.rvizconfiguration file could be used for convenient visualization of vehicle pose w.r.t. world frame. -
[Terminal Window 2] Open-Loop Control: Launch the
open_loop_ctrl_autodrive.launchfile fromracecarpackage on vehicle computer (SSH into vehicle computer). Pass commandline arguments as applicable to the open-loop control test/scheme.$ ssh ccri-car-1@192.168.2.103 $ roslaunch racecar open_loop_ctrl_autodrive.launch velocity:=<velocity> steering:=<steering> velocity_noise:=<velocity_noise> steering_noise:=<steering_noise>
-
[Terminal Window 3] Data Recording: Record contents of all topics to a bag file with a custom name.
- Command line option:
$ cd <path/to/directory/to/save/bag/file(s)> $ rosbag record -a -O <bag_file_name>.bag
- Launch file option (supports topic throttling):
$ roslaunch racecar mocap_data_recording.launch rosbag_dir:=<path/to/directory/to/save/bag/file> rosbag_name:=<bag_file_name>.bag

