First steps
After installing or building from sources, you are ready to test the simulator to get used to MVSIM.
Launch it
We will launch a demo with a Jackal mobile robot in a warehouse. The commands required to launch it depends on the installation method:
If you installed MVSim as a ROS 1 package, just run:
roslaunch mvsim demo_warehouse.launch
If you installed MVSim as a ROS 2 package, just run:
ros2 launch mvsim demo_warehouse.launch.py
Assuming you compiled MVSim in the directory MVSIM_ROOT
,
with cmake build directory build-Release
, run:
cd MVSIM_ROOT
build-Release/bin/mvsim launch mvsim_tutorial/demo_warehouse.world.xml
You should see the GUI of a demo world with a robot equipped with a 3D lidar and, if using the ROS version, an RViz window with a visualization of some of the the published sensor topics.
Move it
If you are running MVSim as a ROS node, you can launch any standard teleoperation node
and send motion commands to /cmd_vel
as with any other robot or simulator.
Additionally, MVSim allows you to move the robot directly using the keyboard or a joystick. Make sure of giving the focus to the MVSim window first, then use these keys:
w/s
to increase/decrease the PI controller setpoint linear speed, anda/d
to change the corresponding angular speed, that is, rotate to the left and right.Use the spacebar as a brake.
In worlds with more than one robot, select the active robot by pressing the numeric keys
1
,2
, etc.
All the details on keyboard and joystick-based control are listed here.
Next, you can jump straight into the many other demo worlds and launch files available under mvsim_tutorial, or continue reading these docs to better understand them.