|
1 éve | |
---|---|---|
.. | ||
Screenshots | 1 éve | |
Template | 1 éve | |
README.md | 1 éve | |
preview.png | 1 éve | |
template.json | 1 éve |
This project is a template designed to help you quickly start simulating robotic arms in Open 3D Engine (O3DE) with Robot Operating System (ROS) 2.
This template focuses on robotic arm manipulation with ROS 2 and MoveIt 2.
To learn about other robotic templates, please refer to documentation of
Robotic templates.
To understand how the manipulation feature works in O3DE, please refer to Joints Manipulation Documentation.
Make sure that your system meets Requirements.
Install ROS 2 dependencies for this template:
sudo apt install ros-${ROS_DISTRO}-moveit ros-${ROS_DISTRO}-moveit-resources ros-${ROS_DISTRO}-depth-image-proc
Please follow the instructions in ROS 2 Gem documentation to install all required dependencies and create your project with a template.
If you followed the steps, your environment variables for O3DE_HOME
and PROJECT_PATH
will be set, your template registered.
Create a new project with the following command:
${O3DE_HOME}/scripts/o3de.sh create-project --project-path $PROJECT_PATH --template-name Ros2RoboticManipulationTemplate
A new project created with this template has two levels to address two different groups of use-cases.
A level to try manipulation on, also suitable for solving picking and vision challenges in isolation. It includes a Panda Franka manipulator, which is a popular choice in AI and manipulation research in the robotic community, RGBD camera, and some small objects to try manipulation with.
The simulated robot is imported from public repository panda_description.
This level is more suitable for simulation of industrial use-cases with palletization. Includes a warehouse scene, UR10, which is an industrial, collaborative robot (cobot), and packages on a conveyor belt.
And run the launch file in the project:
ros2 launch Examples/panda_moveit_config_demo.launch.py
This will result in RViz2 window appearing.
Now you should be able to use Motion Planning
from moveit_ros_visualization package
.
To understand more about MoveIt and robotic manipulation, see tutorials.
The simulated robot can be controlled with MoveIt2 stack with the use of Universal_Robots_ROS2_Driver. Clone the driver repository and follow the installation guide. Make sure to source new packages with the following command in the package workspace top directory:
source install/setup.bash
Following that, run the launch file and you will be able to command trajectories to the robotic arm.
ros2 launch ur_moveit_config ur_moveit.launch.py ur_type:=ur10 use_sim_time:=true use_fake_hardware:=true
Import a robot using URDF, XACRO or SDFormat into O3DE using the provided tutorial.
During importing check the Use articulation for joints and rigid bodies
on the last page of the importer.
To the root entity of your newly created prefab add 3 new components.
Enable motors on all joints and set motor force limit
, stiffness
and damping
values.
In the JointsManipulationEditorComponent
add initial positions for all of the joints (the joint names can be found in the prefabs entities inside the ROS2FrameComponent joint name). The initial positions are in radians.
In the JointsTrajectoryComponent
input the topic for controlling the trajectory. Usually this topic ends with joint_trajectory_controller
. The exact name of the topic will be available in the MoveIt configuration files.
Start the simulation and see as the robot sets itself into its initial position (if something is not right check the O3DE console for logs, which include all joint names). The robot is now ready for being controlled using MoveIt.
Prepare the MoveIt launch files. This can be achieved by creating the files manually, using the already existing configuration provided with your robot or using the MoveIt Setup Assistant.