Skip to content

Latest commit

 

History

100 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Clone repo:

This repo uses git LFS. First, ensure this is installed.

sudo apt-get install git-lfs
git lfs install
cd $VTRROOT
git clone https://github.com/utiasasrl/hunter_sim.git
cd hunter_sim
git lfs pull

Build Dockerfile This is based on the latest GPU vtr3 Dockerfile on Dockerhub

cd $VTRROOT/hunter_sim
docker build -t utiasasrl/vtr3-gazebo:latest .

Run Docker Container

docker run -it --name hunter_sim   --privileged   --network=host   --ipc=host   --gpus=all   -e USER_ID=$(id -u)   -e GROUP_ID=$(id -g)   -e USER_NAME=$(id -un)   -e DISPLAY=$DISPLAY   -v /tmp/.X11-unix:/tmp/.X11-unix:rw   -v ${VTRROOT}:${VTRROOT}:rw   -v /dev:/dev -e NVIDIA_DRIVER_CAPABILITIES=all  utiasasrl/vtr3-gazebo:latest

To enter the container from another terminal

docker exec -it hunter_sim entrypoint.sh bash

If you want to enter the existing container

docker start hunter_sim
docker exec -it hunter_sim entrypoint.sh bash

Build package:

Inside the docker container:

source /opt/ros/humble/setup.bash
cd $VTRROOT/hunter_sim
colcon build

Run Hunter Sim For One Robot:

In the gazebo docker run:

cd $VTRROOT/hunter_sim
source /opt/ros/humble/setup.bash
source install/setup.bash
ros2 launch hunter2_gazebo hunter_gazebo_md_sim.launch.py num_robots:=1

After the simulation has begun, and stabilized, in a second terminal launch vtr.

tmuxp load $VTRROOT/hunter_sim/src/hunter_sim/vtr_hunter/launch/simulated_lidar_hunter.launch.yaml

You can navigate to http://localhost:5200 and interact with the GUI same as if it were a real robot.

To manually drive the robot to teach use the default ros teleop nodes.

For a keyboard only

ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args -r __ns:=/robot0

If you have access to a gamepad

ros2 launch teleop_twist_joy teleop-launch.py joy_config:='xbox' joy_vel:=/robot0/cmd_vel

Stopping the Simulation In the tmux session started above press Ctrl+B then Shift+; and type kill-session

Run Hunter Sim For a Convoy:

In the Gazebo Docker run:

cd $VTRROOT/hunter_sim
source /opt/ros/humble/setup.bash
source install/setup.bash
ros2 launch hunter2_gazebo hunter_gazebo_md_sim.launch.py num_robots:=3 robot_spacing:=2.0

After the simulation has begun, and stabilized, in a second terminal launch vtr.

tmuxp load $VTRROOT/hunter_sim/src/hunter_sim/vtr_hunter/launch/simulated_lidar_convoy_three.launch.yaml

The tmux file is very small now, you can run the convoy easily with any reasonable number of robots.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages