Skip to content

Commit

Permalink
add teleop panel (ros2)
Browse files Browse the repository at this point in the history
  • Loading branch information
finani committed Aug 11, 2024
1 parent c780963 commit f537f15
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 2 deletions.
12 changes: 10 additions & 2 deletions docs/first-steps.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,25 @@ published sensor topics.
Move it
------------

If you are running MVSim as a ROS node, you can launch any standard teleoperation node
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.

If you want to use the teleop panel in rviz2, please install `visualization_tutorials <https://github.com/ros-visualization/visualization_tutorials/tree/ros2>`_.

.. code-block:: bash
cd ros2_ws/src
git clone -b ros2 https://github.com/ros-visualization/visualization_tutorials
colcon build --symlink-install
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, and
- ``a/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
- 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 <teleoperation.html>`_.
Expand Down
5 changes: 5 additions & 0 deletions mvsim_tutorial/demo_1robot_ros2.rviz
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ Panels:
Splitter Ratio: 0.5
- Class: rviz_common/Transformation
Name: Transformation
- Class: rviz_plugin_tutorials/Teleop
Name: Teleop
Topic: /cmd_vel
Visualization Manager:
Class: ""
Displays:
Expand Down Expand Up @@ -275,6 +278,8 @@ Window Geometry:
QMainWindow State: 000000ff00000000fd0000000400000000000001560000037dfc0200000009fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000003d0000037d000000c900fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb0000001c005400720061006e00730066006f0072006d006100740069006f006e00000002fb000000bf0000007b00ffffff000000010000010f0000037dfc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073000000003d0000037d000000a400fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000004420000003efc0100000002fb0000000800540069006d00650100000000000004420000000000000000fb0000000800540069006d00650100000000000004500000000000000000000005dc0000037d00000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
Selection:
collapsed: false
Teleop:
collapsed: false
Tool Properties:
collapsed: false
Transformation:
Expand Down
5 changes: 5 additions & 0 deletions mvsim_tutorial/demo_2robots_r1_ros2.rviz
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ Panels:
Splitter Ratio: 0.5
- Class: rviz_common/Transformation
Name: Transformation
- Class: rviz_plugin_tutorials/Teleop
Name: Teleop
Topic: /r1/cmd_vel
Visualization Manager:
Class: ""
Displays:
Expand Down Expand Up @@ -242,6 +245,8 @@ Window Geometry:
QMainWindow State: 000000ff00000000fd0000000400000000000001f70000035cfc020000000bfb0000001200530065006c0065006300740069006f006e00000001e10000009b000000b000fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000006e000001d30000018200fffffffb0000000a0049006d006100670065010000024d0000009f0000004a00fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb0000001c005400720061006e00730066006f0072006d006100740069006f006e00000002fb000000bf000000ec00fffffffb0000000c00540065006c0065006f007001000002f8000000d20000008000ffffff000000010000010f0000037dfc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073000000003d0000037d0000013200fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000004420000003efc0100000002fb0000000800540069006d00650100000000000004420000000000000000fb0000000800540069006d00650100000000000004500000000000000000000005330000035c00000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
Selection:
collapsed: false
Teleop:
collapsed: false
Tool Properties:
collapsed: false
Transformation:
Expand Down
5 changes: 5 additions & 0 deletions mvsim_tutorial/demo_2robots_r2_ros2.rviz
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ Panels:
Splitter Ratio: 0.5
- Class: rviz_common/Transformation
Name: Transformation
- Class: rviz_plugin_tutorials/Teleop
Name: Teleop
Topic: /r2/cmd_vel
Visualization Manager:
Class: ""
Displays:
Expand Down Expand Up @@ -240,6 +243,8 @@ Window Geometry:
QMainWindow State: 000000ff00000000fd0000000400000000000001f70000035cfc020000000bfb0000001200530065006c0065006300740069006f006e00000001e10000009b000000b000fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000006e000001d30000018200fffffffb0000000a0049006d006100670065010000024d0000009f0000004a00fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb0000001c005400720061006e00730066006f0072006d006100740069006f006e00000002fb000000bf000000ec00fffffffb0000000c00540065006c0065006f007001000002f8000000d20000008000ffffff000000010000010f0000037dfc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073000000003d0000037d0000013200fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000004420000003efc0100000002fb0000000800540069006d00650100000000000004420000000000000000fb0000000800540069006d00650100000000000004500000000000000000000005330000035c00000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
Selection:
collapsed: false
Teleop:
collapsed: false
Tool Properties:
collapsed: false
Transformation:
Expand Down
5 changes: 5 additions & 0 deletions mvsim_tutorial/demo_depth_camera_ros2.rviz
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ Panels:
Splitter Ratio: 0.5
- Class: rviz_common/Transformation
Name: Transformation
- Class: rviz_plugin_tutorials/Teleop
Name: Teleop
Topic: /cmd_vel
Visualization Manager:
Class: ""
Displays:
Expand Down Expand Up @@ -307,6 +310,8 @@ Window Geometry:
QMainWindow State: 000000ff00000000fd0000000400000000000002040000039efc020000000afb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000003d000001cd000000c900fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb0000001c005400720061006e00730066006f0072006d006100740069006f006e00000002fb000000bf0000007b00fffffffb0000000a0049006d0061006700650100000210000001cb0000002800ffffff000000010000010f0000037dfc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073000000003d0000037d000000a400fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000004420000003efc0100000002fb0000000800540069006d00650100000000000004420000000000000000fb0000000800540069006d006501000000000000045000000000000000000000052e0000039e00000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
Selection:
collapsed: false
Teleop:
collapsed: false
Tool Properties:
collapsed: false
Transformation:
Expand Down
5 changes: 5 additions & 0 deletions mvsim_tutorial/demo_greenhouse_ros2.rviz
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ Panels:
- /Current View1
Name: Views
Splitter Ratio: 0.5
- Class: rviz_plugin_tutorials/Teleop
Name: Teleop
Topic: /cmd_vel
Visualization Manager:
Class: ""
Displays:
Expand Down Expand Up @@ -260,6 +263,8 @@ Window Geometry:
QMainWindow State: 000000ff00000000fd00000004000000000000016b0000039efc0200000009fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb0000000a0049006d006100670065010000003d000001330000002800fffffffb000000100044006900730070006c006100790073010000017600000265000000c900fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261000000010000010f0000039efc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073000000003d0000039e000000a400fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000004420000003efc0100000002fb0000000800540069006d00650100000000000004420000000000000000fb0000000800540069006d00650100000000000004500000000000000000000005c90000039e00000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
Selection:
collapsed: false
Teleop:
collapsed: false
Tool Properties:
collapsed: false
Views:
Expand Down
5 changes: 5 additions & 0 deletions mvsim_tutorial/demo_turtlebot_world_ros2.rviz
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ Panels:
Splitter Ratio: 0.5
- Class: rviz_common/Transformation
Name: Transformation
- Class: rviz_plugin_tutorials/Teleop
Name: Teleop
Topic: /cmd_vel
Visualization Manager:
Class: ""
Displays:
Expand Down Expand Up @@ -276,6 +279,8 @@ Window Geometry:
QMainWindow State: 000000ff00000000fd0000000400000000000002040000039efc020000000afb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000003d000001cd000000c900fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb0000001c005400720061006e00730066006f0072006d006100740069006f006e00000002fb000000bf0000007b00fffffffb0000000a0049006d0061006700650100000210000001cb0000002800ffffff000000010000010f0000037dfc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073000000003d0000037d000000a400fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000004420000003efc0100000002fb0000000800540069006d00650100000000000004420000000000000000fb0000000800540069006d006501000000000000045000000000000000000000052c0000039e00000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
Selection:
collapsed: false
Teleop:
collapsed: false
Tool Properties:
collapsed: false
Transformation:
Expand Down
5 changes: 5 additions & 0 deletions mvsim_tutorial/demo_warehouse_ros2.rviz
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ Panels:
- /Current View1
Name: Views
Splitter Ratio: 0.5
- Class: rviz_plugin_tutorials/Teleop
Name: Teleop
Topic: /cmd_vel
Visualization Manager:
Class: ""
Displays:
Expand Down Expand Up @@ -260,6 +263,8 @@ Window Geometry:
QMainWindow State: 000000ff00000000fd00000004000000000000016b0000039efc0200000009fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb0000000a0049006d006100670065010000003d000001330000002800fffffffb000000100044006900730070006c006100790073010000017600000265000000c900fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261000000010000010f0000039efc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073000000003d0000039e000000a400fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000004420000003efc0100000002fb0000000800540069006d00650100000000000004420000000000000000fb0000000800540069006d00650100000000000004500000000000000000000005c90000039e00000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
Selection:
collapsed: false
Teleop:
collapsed: false
Tool Properties:
collapsed: false
Views:
Expand Down

0 comments on commit f537f15

Please sign in to comment.