-
Notifications
You must be signed in to change notification settings - Fork 197
teleop_roboboat_tutorial
This page provides a description of how to drive the spawned USV. It assumes you've gone through the preceding tutorials regarding installation, and spawning. It also assumes a basic familiarity with Gazebo.
The actuators for the boat we spawned in the previous tutorial are defined by the Gazebo Sim Thruster Class. While there are a number of ways to control heading, with two thrusters we can simply employ differential thrust.
First, launch the environment:
ros2 launch vrx_gz vrx_environment.launch.py world:=nbpark
To send messages from ROS2 to Gazebo Sim, we must utilize a bridge, specifying the topics and messages we need to send. For the left thruster:
ros2 run ros_gz_bridge parameter_bridge /model/roboboat01/joint/left_engine_propeller_joint/cmd_thrust@std_msgs/msg/Float64]gz.msgs.Double
and for the right thruster:
ros2 run ros_gz_bridge parameter_bridge /model/roboboat01/joint/right_engine_propeller_joint/cmd_thrust@std_msgs/msg/Float64]gz.msgs.Double
You can test that the bridges are working by publishing a topic to one or both of the thrusters:
ros2 topic pub /model/roboboat01/joint/left_engine_propeller_joint/cmd_thrust std_msgs/msg/Float64 "data: 150"
using this command you should see your boat going in circles.
In Progress