Everything will be based off Ubuntu 22.04.
- Install ROS2 Iron
- Add:
source /opt/ros/iron/setup.bash
to your.bashrc
file - Check you can run
ros2
- Install Eclipse Cyclone DDS
- Add
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
to.bashrc
- Check you can run
ros2
in a new terminal - Install MoveIt2
We use moveit visulization tools.
sudo apt install ros-iron-moveit-visual-tools
We've cloned xarm libraries as a submodule: https://github.com/xArm-Developer/xarm_ros2/tree/rolling
We need to install the dependencies.
Make sure your submodules are updated first and you're on the rolling
branch.
- cd dev_ws/src
- rosdep update
- rosdep install --from-paths . --ignore-src --rosdistro iron -y
Check you can build.
- cd dev_ws
- colcon build
Optional: Add source <input path to repo>/dev_ws/install/setup.bash
to
.bashrc
. If you don't add this, remember to source it everytime you need
to use ros.
TODO: Need to configure network settings and connect to the local network of the arm. This step is not needed if you're simulating.
Make sure everything is sourced (ros, and the installation)
- cd dev_ws
- colcon build
IMPORTANT: Gripper doesn't quite work right now for some reason. It just crashed the node.
# 【simulated Lite6】launch xarm_planner_node
ros2 launch xarm_planner lite6_planner_fake.launch.py [add_gripper:=true]
# 【real Lite6】launch xarm_planner_node
ros2 launch xarm_planner lite6_planner_realmove.launch.py robot_ip:=192.168.1.185 [add_gripper:=true]
This above command runs the ros2/moveit nodes for us to interact with the arm. Keep this running in a terminal.
- Run a test (note if you ran realmove, the arm will move. Be careful!)
ros2 launch planner planner.launch.py dof:=6 robot_type:=lite
If you see the arm move, or the simulation move. You have set this up correctly!
There's a basic planner package that you can investigate. Be sure to source all the required dependencies.
- cd dev_ws
- colcon build --packages-up-to planner
Build the planner package and all of its dependencies
- ros2 launch planner planner.launch.py dof:=6 robot_type:=lite