-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4beaf23
commit ac68b95
Showing
1 changed file
with
116 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,124 @@ | ||
# hunter_robot | ||
# Hunter Robot Simulation | ||
|
||
This repository contains the **URDF** description and Gazebo simulation for the **Hunter V2** robot. The Hunter V2 is an **Ackermann-steered** mobile robot with front-wheel steering, simulated using ROS 2 control. | ||
|
||
Official Robot Website: [AgileX Hunter V2B](https://robosavvy.co.uk/agilex-hunter-2b.html) | ||
|
||
--- | ||
|
||
## Key Features | ||
|
||
- **Ackermann Steering**: Configured for front-wheel steering with accurate kinematics. | ||
- **ROS 2 Control Integration**: Leverages `ros2_control` for simulating robot kinematics and dynamics. | ||
- **URDF Description**: Detailed robot description based on manufacturer specifications. | ||
- **Gazebo Simulation**: Visualize and simulate the Hunter V2 robot in Gazebo. | ||
- **Rviz Support**: Visualize the robot and interact with its joints using Rviz. | ||
|
||
--- | ||
|
||
|
||
## Installation and Build Instructions | ||
|
||
### Prerequisites | ||
Ensure you have a ROS 2 workspace set up. If not, create one: | ||
```bash | ||
sudo apt install ros-humble-ackermann-* | ||
mkdir -p ~/ros2_ws/src | ||
cd ~/ros2_ws | ||
colcon build | ||
``` | ||
|
||
### Clone and Build | ||
1. Clone this repository into your ROS 2 workspace: | ||
```bash | ||
cd ~/ros2_ws/src | ||
git clone https://github.com/LCAS/hunter_robot.git | ||
``` | ||
2. Install dependencies: | ||
```bash | ||
rosdep update | ||
rosdep install --from-paths . --ignore-src -r -y | ||
``` | ||
3. Build the workspace: | ||
```bash | ||
cd ~/ros2_ws | ||
colcon build | ||
source install/setup.bash | ||
``` | ||
|
||
--- | ||
|
||
ros2 run joint_state_publisher_gui joint_state_publisher_gui | ||
## Packages Overview | ||
|
||
ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args --remap cmd_vel:=/ackermann_steering_controller/reference -p stamped:=true | ||
This repository includes the following ROS 2 packages: | ||
|
||
1. **`hunter_description`**: URDF and robot description files. | ||
2. **`hunter_gazebo`**: Simulation environment for the Hunter V2 in Gazebo. | ||
|
||
--- | ||
|
||
## Usage | ||
|
||
### 1. Visualize the Robot in Rviz | ||
|
||
To view the robot model and interact with its joints in Rviz: | ||
|
||
```bash | ||
ros2 launch hunter_description robot_view.launch.py | ||
``` | ||
|
||
<!-- REF: https://youtu.be/BcjHyhV0kIs?si=dUpg7IF-kHSUgB-w --> | ||
<!-- Robot website: https://robosavvy.co.uk/agilex-hunter-2b.html --> | ||
<!-- The values are from: https://github.com/agilexrobotics/ugv_gazebo_sim/blob/master/hunter/hunter2_base/urdf/hunter2_base_gazebo.xacro --> | ||
This launch file starts Rviz and loads the Hunter V2 model. | ||
|
||
 | ||
|
||
--- | ||
|
||
### 2. Simulate the Robot in Gazebo | ||
|
||
To load the Hunter V2 in a Gazebo simulation environment: | ||
|
||
```bash | ||
ros2 launch hunter_gazebo launch_sim.launch.py | ||
``` | ||
|
||
 | ||
|
||
--- | ||
|
||
### 3. Control the Robot with Teleop | ||
|
||
You can control the Hunter V2 using the `teleop_twist_keyboard` package. First, ensure the simulation is running, then execute: | ||
|
||
```bash | ||
ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args --remap cmd_vel:=/ackermann_like_controller/cmd_vel | ||
``` | ||
|
||
Use the keyboard inputs to move the robot in the simulation. | ||
|
||
--- | ||
|
||
## Robot Specifications | ||
|
||
The primary robot parameters, such as mass, wheel size, and turning angles, are derived from the manufacturer's specifications and the following reference repository: | ||
- [Hunter 2 Base URDF (AgileX Robotics)](https://github.com/agilexrobotics/ugv_gazebo_sim/blob/master/hunter/hunter2_base/urdf/hunter2_base_gazebo.xacro) | ||
--- | ||
## License | ||
This project is licensed under the **Apache License**. See the [LICENSE](LICENSE) file for details. | ||
--- | ||
## References | ||
For more details on ROS 2 Control and Gazebo integration, see: | ||
- [ros2_controllers](https://github.com/ros-controls/ros2_controllers/tree/master) | ||
- [gazebo_ros2_control](https://github.com/ros-controls/gazebo_ros2_control) | ||
- [Getting Started with ros2_control](https://control.ros.org/humble/doc/getting_started/getting_started.html) | ||
- [ros2controlcli Documentation](https://control.ros.org/master/doc/ros2_control/ros2controlcli/doc/userdoc.html) | ||
- [gazebo_ros2_control User Guide](https://control.ros.org/rolling/doc/gazebo_ros2_control/doc/index.html) | ||
- [Video Tutorial](https://youtu.be/BcjHyhV0kIs?si=dUpg7IF-kHSUgB-w) | ||
https://control.ros.org/master/doc/ros2_control/ros2controlcli/doc/userdoc.html | ||
--- |