Skip to content

ascentai/tmr_ros1

 
 

Repository files navigation

TM ROS Driver

1. Overview

The TM Robot is a state-of-the-art production tool that is highly compatible and flexible to collaboration between human and machine. The Robot Operating System (ROS) provides abundant libraries and tools which can be utilized to reduce the cost of trivial development software tool and build robot applications without struggling. Our TM ROS driver provides nodes for communication with Techman Robot controllers, data including robot states, images from the eye-in-hand camera and URDF models for various robot arms via TMFlow.

2. Feature

ROS1 Driver

The TM ROS driver connects to TMFlow ethernet slave to control TMFlow project. Robot state is transmitted through this connection. A working driver also connects to a listen node (running at a TMFlow project) at the same time. To control the robot locomotion ,IO ,etc., the TM ROS driver sends robot script (TM Robot Expression) through this connection. More information about TM Robot Expression and ethernet slave, see [Expression Editor and Listen Node.pdf] The TM ROS driver for ROS1 is a single ROS node which creates a ROS interface such as topics and services:

Action Server

  • An action interface on /follow_joint_trajectory for seamless integration with MoveIt

Topic Publisher

  • publishes feedback state on /feedback_states
    feedback state include robot position, error code, io state, etc. (see tm_msgs/msg/FeedbackState.msg)
  • publishes joint states on /joint_states
  • publishes tool pose on /tool_pose

Service Server

  • /tm_driver/send_script (see tm_msgs/srv/SendScript.srv) :
    send robot script (TM Robot Expression) to listen node
  • /tm_driver/set_event (see tm_msgs/srv/SetEvent.srv) :
    send "Stop", "Pause" or "Resume" command to listen node
  • /tm_driver/set_io (see tm_msgs/srv/SetIO.srv) :
    send digital or analog output value to listen node
  • _/tm_driver/set_position (see tm_msgs/srv/SetPosition.srv) :
    send motion command to listen node, the motion type include PTP, LINE, CIRC ans PLINE, the position value is joint angle(J) or tool pose(T), see [[Expression Editor and Listen Node.pdf]]

Usage

For example, execute the launch file to enable the driver to connect to tm5-900 robot

roslaunch tm_driver tm5_900_bringup.launch robot_ip:=YOUR_ROBOT_IP_ADDRESS

3. Usage

TMFlow setup

Listen node

  1. Create a flow project; then choose the listen node and the Goto node 1

  2. Go to the System/Network setting page
    Type network parameters of device for ROS 2

  3. Go to the Setting/Connection page
    Enable the Ethernet Slave item
    Click on the Data Table Setting button and check the following boxes:

    • Robot_Error
    • Project_Run
    • Project_Pause
    • Safeguard_A
    • ESTOP
    • Camera_Light
    • Error_Code
    • Joint_Angle
    • Coord_Robot_Flange
    • Coord_Robot_Tool
    • TCP_Force
    • TCP_Force3D
    • TCP_Speed
    • TCP_Speed3D
    • Joint_Speed
    • Joint_Torque
    • Project_Speed
    • MA_Mode
    • Robot Light
    • Ctrl_DO0~DO7
    • Ctrl_DI0~DI7
    • Ctrl_AO0
    • Ctrl_AI0~AI1
    • END_DO0~DO3
    • END_DI0~DI2
    • END_AI0

    2

TM ROS driver usage

Change the current working directory of the terminal to your workspace<workspace>and set up the environment.

cd <workspace>
source devel/setup.bash

Manipulate the virtual TM robot:

roslaunch tm5_900_moveit_config tm5_900_moveit_planning_execution.launch sim:=True

You can also manipulate TM robot in the real world:

roslaunch tm5_900_moveit_config tm5_900_moveit_planning_execution.launch sim:=False robot_ip:=<robot_ip>

The parameter <robot_ip> means the IP address of the robot control pc.

GUI debug and demo

This GUI shows up tm_driver connection status, sct sta svr messages and robot status. You can use this GUI to check driver and robot connect status and send re-connect command and base on this GUI to modify.

How to use it

  1. Create a folder ~/tm_driver by type
    mkdir ~/tm_driver
    cd ~/tm_driver
  2. Download this package by using git
    git clone https://github.com/TechmanRobotInc/tmr_ros1.git
  3. Build the source code and set the path
    catkin_make
    source ./devel/setup.bash
  4. Open a terminal and type
    roscore
  5. Open another terminal and type
    rosrun tm_driver tm_driver <robot_ip>
    <robot_ip> is tm robot ip address, you can get it by TM Flow, for example 192.168.10.2
  6. Open another terminal and type
    rosrun ui_for_debug_and_demo robot_ui

UI description

  1. When is_srv_connect and is_sct_connect are true, it means the all connection is success.
  2. If is_srv_connect is false, you should check the data table is correct or not.
  3. If is_sct_connect is false, you should check whether you run the project or not.
  4. If is_srv_connect and is_sct_connect are true, but robot link is false. It means you connect the TM project, but you are not in listen node, so you when you send the move command, it doesn't work.
  5. When you send a command or click "change control box IO", you can see "Robot Response" add a response item, the item details you can reference SctResponse.msg, StaResponse.msg and SvrResponse.msg.
  6. You can click "clear" to clear the old response items.
  7. If you didn't open the tm_ros_driver, you will see all items show "Not ini".

About

techman robot ROS1 driver (experiment)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 73.3%
  • Python 21.4%
  • CMake 5.2%
  • C 0.1%