Tinker simulation based on ROS2 and gazebo11, adapted from tinker_nav_sim
- Prepration:
- Install all dependecies(You should setup
rosdep
first following official documentation):rosdep install --from-paths src -y --ignore-src
- Install
gazebo_ros
packagesudo apt install ros-humble-gazebo-ros-pkgs
- Install
ros2 control
dependencysudo apt-get install ros-humble-ros2-control sudo apt-get install ros-humble-ros2-controllers sudo apt-get install ros-humble-gazebo-ros2-control
- Install
Universal_Robots_ROS2_Driver
packagesudo apt-get install ros-humble-ur
- If you need to do navigation simulation, install
nav2
dependencysudo apt install ros-humble-navigation2 sudo apt install ros-humble-nav2-bringup sudo apt install ros-humble-robot-localization sudo apt install ros-humble-slam-toolbox
All terminals should source
the setup.bash
(setup.zsh
) in workspace first.
Be sure you are using gnome-terminal
rather than xterm
Launch the visual model of tinker, which shows the RobotModel
ros2 launch tinker_sim display.launch.py
Launch the robot and controller, which test the robot and chassis controller
ros2 launch tinker_sim gazebo_sim.launch.py
Set use_teleop:=True
to control the base by keyboard
Then run the following command in another ternimal to control the arm by moveit:
ros2 launch tinker_sim arm_moveit.launch.py
The UR simulation refers https://github.com/UniversalRobots/Universal_Robots_ROS2_Gazebo_Simulation
To move it to Tinker, please change add the prefix "ur_" to all the controllers yaml except joint_limits.yaml in config/ur5
. And set use_fake_hardware:=true
in simulation.
The controller shaking problem and broken joints can be solved in UniversalRobots/Universal_Robots_ROS2_Gazebo_Simulation#11 and UniversalRobots/Universal_Robots_ROS2_Gazebo_Simulation#19
<joint name="${prefix}wrist_3_joint" type="revolute">
[...]
<dynamics damping="0.7" friction="1.0"/>
</joint>
<gazebo reference="${prefix}wrist_3_joint">
<implicitSpringDamper>true</implicitSpringDamper>
</gazebo>
Launch slam toolbox and localization
ros2 launch navigation_sim gazebo_robot.launch.py headless:=False use_teleop:=True
Launch navigation stack
ros2 launch navigation_sim navigation.launch.py headless:=False
Set 2D pose first, then set a goalpose in rviz.