UGV Beast Jetson Orin ROS2 9. Web-based Control Tool

From Waveshare Wiki
Jump to: navigation, search
UGV Beast Jetson Orin ROS2
360px-UGV Beast PT Jetson ROS2 Kit.jpg

I2C, UART
TTL Serial Bus Servo Control Interface
{{{name2}}}

{{{name3}}}

{{{name4}}}

{{{name5}}}

{{{name6}}}

9. Web Control Tool

This chapter introduces web-based console tools. The robot project uses the Vizanti Web tool, a web-based visualization and control tool designed to make it easier to operate the robot's ROS2 functions. The application tries to replicate the orthographic 2D view of RViz on the browser as precisely as possible. The second objective is to allow reconfiguration, planning and execution of movement and task instructions such as target points and waypoints via custom buttons and parameters.

By default, you have completed the main program and remotely connected to the Docker container according to the content in Chapter 1 UGV Beast Jetson Orin ROS2 1. Preparation. In the container, start the web application, ip is the IP address of the Jetson Orin (also the IP address used to log in to the Docker container):

ros2 launch ugv_web_app bringup.launch.py host:=ip

After successful operation, it will appear as shown below:

ROS2 webapp.png

Then in a computer from the same LAN (it can also be Jetson Orin system), open a browser (preferably Google Chrome) and enter Jetson Orin's IP address + :5100 in the address bar, for example :192.168.10.212:5100.

At this point, there is no data displayed in the web interface because there is no relevant node to start the robot.


9.1 Control robot movement

9.1.1 Run robot driver node

Open a new Docker container terminal, click the ⭐ symbol in the left sidebar, double-click to open Docker's remote terminal, enter username: root, password: jetson.

ROS2 newDocker.png

Start the robot driver node:

ros2 launch ugv_bringup bringup_lidar.launch.py use_rviz:=true

Once launched, a TF coordinate system diagram appears in the web interface, as well as the RViz 2 model interface for the robot.

ROS2 webapp1.png

The following describes common tools for Web interfaces:

  • ROS2 webapp2.png Global Settings: Global settings. You can set the background color and fix the TF coordinate system, and you can reset the camera view to zero and default zoom.
  • ROS2 webapp3.png Rosbridge Connection: Bridge connection. Here shows information such as the connection status and the URL link.
  • ROS2 webapp4.png Grid Renderer: Grid. It shows adjustable metric grid.
  • ROS2 webapp5.png TF Frame Renderer: TF coordinate system. Render the TF coordinate system, most of the options are the same as in RViz, and you don't need to set them anymore.
  • ROS2 webapp6.png Add Widgets: Add widgets.


9.1.2 Control robot movement

Next, we first add a joystick widget to control the movement of the robot. Click Add Widgets and select Teleop Joystick, a circle button will appear in the web interface, through which you can control the movement of the robot.

ROS2 webapp7.pngROS2 webapp8.png

9.2 Map

Before starting the mapping node, make sure that the above-mentioned chassis drive node is shut down. You need to refer to UGV Beast Jetson Orin ROS2 4. 2D Mapping Based on LiDAR or UGV Beast Jetson Orin ROS2 5. 3D Mapping Based on Depth Camera to start the mapping node.

Once launched, click Add Widgets in the web interface and select Map.

ROS2 webapp9.png

Next, click the Map icon and select Topic as /map, so that you can see the map in the RViz interface.

ROS2 webapp10.png

Finally, you can use the joystick or keyboard to control the movement of the robot to build a map, or you can use the joystick widget added earlier to control the movement of the robot to build a map. After building the map, you can also refer to the instructions in the mapping tutorial to save the map.


9.3 Navigate

Once you've built the map, run the command to start navigation in the Docker container:

ros2 launch ugv_nav nav.launch.py use_rviz:=true

There is no use_localization specified in this command, and the navigation based on the AMCL algorithm is used by default, as detailed in UGV Beast Jetson Orin ROS2 6. Auto Navigation section.

By setting the Topic in the Map widget to /map, you can see the map saved after completing the previous mapping, which is consistent with the map displayed in the RViz2 interface.

ROS2 webapp11.png

Click Add Widgets in the web interface and select the two widgets 2D Pose Estimate and 2D Nav Goal to add.

ROS2 webapp12.png

You can use 2D Pose Estimate to indicate the position of the robot on the map. The direction of the green arrow is the direction in which the robot's pan-tilt is facing forward.

Select a target location for the robot on the map. You can use the 2D Nav Goal tool to send the target location and direction to the robot. Indicate the location (target point) that the robot wants to automatically navigate to on a map in the web interface, and the direction of the purple arrow is the direction of the robot pan tilt facing forward. Release the mouse after pointing out the target location, and the robot will move to that target location.

From now on, you can control robot movement, mapping and navigation through web control tools. Users can also expand and develop the functions of other components according to their own needs.