Skip to content

andy-Chien/robot_control_hiwin_ros

 
 

Repository files navigation

How to use the module

from control_node import HiwinRobotInterface

Making Python Module for Another Package

  1. Uncomment following line in CMakeLists.txt
catkin_python_setup()
  1. Let structure of package like following:
-- package_name/
   |-- some_folder/
   |-- src/
       |-- package_name/
           |-- __init__.py
           |-- some_package/
           |-- some_module.py
   |-- CMakeLists.txt
   |-- package.xml
   |-- setup.py
  1. Make a setup.py in package
## ! DO NOT MANUALLY INVOKE THIS setup.py, USE CATKIN INSTEAD

from distutils.core import setup
from catkin_pkg.python_setup import generate_distutils_setup

# fetch values from package.xml
setup_args = generate_distutils_setup(
    packages=['package_name'],
    package_dir={'': 'src'},
)

setup(**setup_args)
  1. Build the package
cd SOMEWORKSPACE
catkin_make

HIWIN ROS-I Package

Run simulated MoveIt! environment without real robot

  • Run the demo launch file with the command:

    roslaunch hiwin_robot_moveit_config demo.launch manipulator_model:=<manipulator_model> gripper_model:=<gripper_model>

    Note:

    • substitute <manipulator_model> with the robot model (e.g. ra605_710_gb).
    • substitute <gripper_model> with the gripper model (e.g. xeg_16).

Run package to control a real Robot and Gripper

If you already purchased a robotic arm and an electric gripper you can follow the following steps:

  1. Connect the robotic arm to your network through an ethernet cable, make sure your computer and your robot are on the same domain (e.g. robot's ip is 192.168.0.1, computer's ip is 192.168.0.100).

  2. Connect your gripper via USB to your computer and check in which COM port is the USB insert. (You can use XEG-W1 software to check gripper's COM Port)

  3. Load the control nodes for robot and gripper:

    roslaunch hiwin_driver hiwin_robot_interface.launch manipulator_ip:=<manipulator_ip>

    roslaunch hiwin_driver hiwin_gripper_interface.launch gripper_model:=<gripper_model> gripper_com_port:=<gripper_com_port>

    Note:

    • substitute <manipulator_ip> with the IP address of the robotic arm.
    • substitute <gripper_model> with the gripper model (e.g. xeg_16).
    • substitute <gripper_com_port> with the gripper p (16 or 32).
  4. Load the model, run MoveIt! and (optional) run the RVIZ simulated environment

    roslaunch hiwin_robot_moveit_config start_planning.launch manipulator_model:=<manipulator_model> gripper_model:=<gripper_model>

    Note:

    • substitute <manipulator_model> with the robot model (default is ra605_710_gb)
    • substitute <gripper_model> with the gripper model (e.g. xeg_16).

Licence

All the files included in this directory are under the BSD 3 Clause Licence. A copy of the licence is included in this folder.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 79.0%
  • CMake 13.0%
  • C++ 5.0%
  • C 3.0%