Expand description
§arci-ros2
ROS2 implementation for arci.
§Dependencies
§Install
sudo apt install ros-humble-nav2-msgs ros-humble-geometry-msgs # for navigation
sudo apt install ros-humble-ros2-control ros-humble-ros2-controllers # for ros2_control
sudo apt install ros-humble-tf2-msgs # for tf2
sudo apt install libclang-dev # for r2r§Build
Build openrr with the feature ros2
source /opt/ros/humble/setup.bash
cargo build --features ros2§How to use (navigation2)
§Install navigation2
Read here and install navigation2 and simulator.
§Launch simulator
ros2 launch nav2_bringup tb3_simulation_launch.py§Run command line tools
§Send navigation goal via command line
Don’t forget to set the initial pose of the robot before sending the goal pose using the 2D Pose Estimate button of rviz.
./target/debug/openrr_apps_robot_command --config-path ./openrr-apps/config/turtlebot3_robot_client_config_ros2.toml send_navigation_goal -- -0.5 0.2 -1.5§GUI to send velocity
./target/debug/openrr_apps_velocity_sender --config-path ./openrr-apps/config/turtlebot3_robot_client_config_ros2.toml§How to use (ros2_control)
§Install ros2_control_demos
- Clone ros2_control_demos
- Checkout the corresponding branch and install it
- Source
install/setup.bash.
§Launch rrbot example and controllers
Launch rrbot example
ros2 launch ros2_control_demo_example_1 rrbot.launch.pyThen, inactive forward_position_controller and active joint_trajectory_position_controller.
ros2 control set_controller_state forward_position_controller inactive
ros2 control load_controller joint_trajectory_position_controller --set-state activejoint_state_broadcaster and joint_trajectory_position_controller should now be activated, and forward_position_controller should now be inactivated.
$ ros2 control list_controllers
joint_state_broadcaster[joint_state_broadcaster/JointStateBroadcaster] active
forward_position_controller[forward_command_controller/ForwardCommandController] inactive
joint_trajectory_position_controller[joint_trajectory_controller/JointTrajectoryController] active§Run command line tools
§Run ros2_control example of arci-ros2
cargo run --package arci-ros2 --example ros2_control --features ros2§License
Licensed under the Apache License, Version 2.0.
Re-exports§
pub use r2r;
Modules§
Structs§
- Node
- ROS2 node. This is a wrapper around
Arc<Mutex<r2r::Node>>. - Ros2
CmdVel Move Base arci::MoveBaseimplementation for ROS2.- Ros2
CmdVel Move Base Config - Configuration for
Ros2CmdVelMoveBase. - Ros2
Control Client arci::JointTrajectoryClientimplementation for ROS2.- Ros2
Control Config - Configuration for
Ros2ControlClient. - Ros2
Laser Scan2D arci::LaserScan2Dimplementation for ROS2.- Ros2
Laser Scan2D Config - Configuration for
Ros2LaserScan2D. - Ros2
Localization Client arci::Localizationimplementation for ROS2.- Ros2
Localization Client Config - Configuration for
Ros2LocalizationClient. - Ros2
Navigation arci::Navigationimplementation for ROS2.- Ros2
Navigation Config - Configuration for
Ros2Navigation. - Ros2
Transform Resolver arci::TransformResolverimplementation for ROS2.