Skip to content

markusbuchholz/ros2_moveit_manipulators

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ROS2 and Moveit for manipulators

This repository provides the Docker container to run ROS 2 with Moveit. It provides simple programs to move the robot in joint space and working space.

image

Build

cd docker
sudo ./build.sh

Run

sudo ./run.sh

colcon build

source ./install/setup.bash

Start Moveit

# workingspace: ws_moveit2
ros2 launch moveit2_tutorials demo.launch.py

and following the link

Start motion application

# start your second terminal and connect to the running Docker container
cd ../colcon_ws

colcon build

source ./install/setup.bash

# move robot in joint space
ros2 run alpha_moveit joint_moveit


# move robot in working space
ros2 run alpha_moveit ik_moveit

Launch Fanuc arm

image

cd ../colcon_ws

ros2 launch fanuc_moveit_config demo.launch.py

Launch Yaskawa GP-8

image

cd ../colcon_ws

ros2 launch moveit_resources_moto_moveit_config xy_start.launch.py

Launch Kuka

image

ros2 launch kuka_arm_pkg p1_c_moveit_kuka_arm.launch.py

# run the launch file in order to send custom goals using Move group interface

ros2 launch kuka_arm_pkg p1_d_moveit_node_controlling.launch.py

Run IK using Moveit,

ros2 launch kuka_arm_pkg launch_kuka_arm.launch.py

One XYZ goal (working space)

ros2 run kuka_arm_pkg ik_kuka

Multiple XYZ goals (working space)

ros2 run kuka_arm_pkg ik_x_kuka

Move robot (joint space), check final position and call IK

ros2 run kuka_arm_pkg move_kuka

Lanuch Reach Alpha 5 (Underwater applications)

image

Note: run in colcon_ws

ros2 launch alpha_bringup_simulation planning_alpha5.launch.py

Run linear motion

alpha_linear

  1. Run in terminal 1,
ros2 launch alpha_bringup_simulation planning_alpha5.launch.py
  1. Run in terminal 2 (linear controller),
cd /root/colcon_ws/src/py_alpha_move/py_alpha_move

python3 linear_ik_controller_node_sim.py
  1. Run in terminal 3,

Run following commands and the end-effector of the robot moves linearly (almost).

ros2 topic pub /target_position std_msgs/msg/Float64MultiArray "data: [0.2, 0.3, 0.0]" -1

ros2 topic pub /target_position std_msgs/msg/Float64MultiArray "data: [0.2, -0.3, 0.0]" -1

ros2 topic pub /target_position std_msgs/msg/Float64MultiArray "data: [0.3, 0.0, 0.0]" -1
  1. Check actual end-effector postion
cd /root/colcon_ws/src/py_alpha_move/py_alpha_move

python3 check_EE_pos.py
  1. Optional, there is a possibility to launch IK solver running in C++ (we use Ceres solver),
colcon build

ros2 run ik_solver_cpp ik_solver_node

Run motion program (working space - IK Solver)

  1. Run in terminal 1,
ros2 launch alpha_bringup_simulation planning_alpha5.launch.py
  1. Run in terminal 2 (IK Solver),
cd /root/colcon_ws/src/py_alpha_move/py_alpha_move

python3 alpha_ik_controller_sim.py
  1. Run in terminal 3,
ros2 topic pub /target_position std_msgs/msg/Float64MultiArray "data: [0.19, -0.07, 0.03]" -1
  1. Move the robot in working space using keyboard,
cd /root/colcon_ws/src/py_alpha_move/py_alpha_move

python3 xyz_mapper_sim.py

There is possible to check performance of QuIK for Alpha 5 but it does not produce correct joint values (due to wrong DH we passed in yaml file ?).

ros2 run quik alpha5_ros_cpp_node --ros-args --params-file /root/colcon_ws/src/quik/config/alpha5.yaml

publish to this node,

ros2 topic pub /target_position std_msgs/msg/Float64MultiArray "data: [0.19, -0.07, 0.03]" -1

Run motion program (joint space)

ros2 run alpha_moveit joint_moveit

Run motion (pos control)

ros2 launch alpha_bringup_simulation planning_alpha5.launch.py

Verify Controller is Active:

ros2 control list_controllers

Expected Output:

xsubsea                 joint_trajectory_controller/JointTrajectoryController  active
joint_state_broadcaster joint_state_broadcaster/JointStateBroadcaster          active

Move robot:

ros2 topic pub /xsubsea/joint_trajectory trajectory_msgs/msg/JointTrajectory "joint_names:
  - 'axis_a'
  - 'axis_b'
  - 'axis_c'
  - 'axis_d'
  - 'axis_e'
points:
  - positions: [1.0, 0.5, -0.5, 0.0, 1.5]
    time_from_start:
      sec: 2
      nanosec: 0" -1

Run teleoperation app

Expected results,
teleoperation_low

It is required to run other Docker container to capture motion and estimate the postion of hand.

Clone here,

git clone https://github.com/markusbuchholz/camera_depth_ros2.git

Complete command pipeline,

#terminal 1 
# from current Docker
ros2 launch alpha_bringup_simulation planning_alpha5.launch.py

#terminal 2 
# from current Docker
cd /root/colcon_ws/src/py_alpha_move/py_alpha_move
python3 alpha_ik_controller_sim_const_axis_b.py


#terminal 3
#from camera_depth_ros2
cd /home/devuser/cam_ws/src/dev_opencv_py/dev_opencv_py
python3 cam_pub.py


#terminal 4
#from camera_depth_ros2
cd /home/devuser/src/mediapipe
python3 python3 ros2_xy_gripper_sim_display.py 

Reach Alpha 5 Motion executor

Run a simple bash script to pass manipulator positions in joint space.

The robot positions need to be computed by a trajectory optimizer.

cd /root/colcon_ws/src/py_alpha_move/py_alpha_move

./run_trajectory.sh

Expected results,

alpha_reach_traj_2


Recommended reads

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published