By giving a target pose, the youbot should successfully move towards the pose. For addressing the problem, the linear and angular velocities must be synchronized. The code is written in C++ language with node lifecycle implemented.
- Node Life Cycle
- Dynamic Variable Configuration
- Synchronized linear, angular motion
- Obstacle detection
- Install ROS rolling. And then source it.
sudo apt install ros-rolling-desktop
source /opt/ros/rolling/setup.bash
- Install gazebo
sudo apt-get install ros-rolling-ros-gz
- Install vscode For more information please refer to vscode download page.
The necessary packages are as following:
- rclcpp
- geometry_msgs
- tf2
- tf2_ros
- tf2_geometry_msgs
- tf2_sensor_msgs
- sensor_msgs
- rclcpp_lifecycle
-
Launch gazebo and spawn the youbot in the environment.
ros2 launch youbot_gazebo start_world.launch.py ros2 launch youbot_gazebo spawn_youbot_ros2.launch.xml
-
Run the ROS node.
ros2 launch mir_direct_base_controller direct_base_controller.launch.py
-
Launch RQT to publish target pose.
rqt
-
Run the lifecycle node.
ros2 run lifecycle_controller lifecycle_controller --ros-args -p lc_name:=direct_base_controller
- To understand execution details, please refer to wikipage.