This repository is the project of virtual reality for robotics course.
Open PowerShell and run the ubuntu 20.04
wsl --distribution Ubuntu-20.04
Follow link to setup desktop GUI Start RDP with
sudo /etc/init.d/xrdp start
Now, open Remote Desktop on your Windows host machine, and connect to localhost:3390
Run Airsim on Windows and ROS wrapper on WSL 2
export WSL_HOST_IP=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}')
Launch rosnodes
source devel/setup.bash
roslaunch airsim_ros_pkgs airsim_node.launch output:=screen host:=$WSL_HOST_IP
roslaunch airsim_tutorial_pkgs front_stereo_and_center_mono.launch
Now open .sln file with visual studio 2022 and open project file and press F5 to run. This will launch the envoronment in unreal engine
Press play and this will start the simulation with drone
Clone this repository as it contains the package to teloperate drone in the environment. Now launch airsim_teleop to control the drone to teleoperate in the environment
rosrun airsim_teleop teleop_twist_keyboard2.py
roslaunch rtabmap_launch rtabmap.launch \
rtabmap_args:="--delete_db_on_start --Optimizer/GravitySigma 0.3" \
depth_topic:=/airsim_node/Drone_1/camera_1/DepthPlanar/compressed \
rgb_topic:=/airsim_node/Drone_1/camera_1/Scene/compressed \
camera_info_topic:=/airsim_node/Drone_1/camera_1/Scene/camera_info \
approx_sync:=false \
wait_imu_to_init:=true \
imu_topic:=/airsim_node/Drone_1/imu/imu_1