GithubHelp home page GithubHelp logo

techmanrobotinc / tmr_ros1 Goto Github PK

View Code? Open in Web Editor NEW
48.0 4.0 21.0 46.71 MB

TM Robots supporting ROS1 drivers and some extended external applications. (experimental) (not support the new TM S-Series)

License: Other

CMake 4.71% C++ 81.64% Python 13.65%

tmr_ros1's Introduction

TM ROS Driver

1. Overview

Techman 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

This driver is for ROS1 Melodic version.
To use the driver, make sure your ROS PC is installed correctly.
If the user wants to know how to use the ROS2 driver, please visit the TM ROS2 driver website or directly click on the listed Github repo: TM App Release below ROS2 projects in the table.

More information: TM ROS driver support list

TMflow + TM Robot Series
ROS Distro GitHub repo: TM App Release TM ROS Driver TMvision Support GitHub Branch
ROS Melodic Morenia TM ROS1 Melodic ✕  melodic
ROS Noetic Ninjemys TM ROS1 Noetic noetic
ROS 2 Dashing Diademata TM ROS2 Dashing dashing
ROS 2 Foxy Fitzroy TM ROS2 Foxy foxy
ROS 2 Humble Hawksbill TM ROS2 Humble humble
TMflow 2 + TM AI Cobot S-Series
ROS Distro GitHub repo: TM 2 App Release TM ROS Driver TMvision Support GitHub Branch
ROS Noetic Ninjemys TM2 ROS1 Noetic noetic
ROS 2 Foxy Fitzroy TM2 ROS2 Foxy foxy
ROS 2 Humble Hawksbill TM2 ROS2 Humble humble

Note: The Github repo: TM 2 App Release applies to TMflow Version 2.14 or above and adapts to HW5.0 mainly.

ROS1 Driver

The TM ROS driver connects to TMflow Ethernet Slave to control TMflow project. The 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 the 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 that 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

  • publish feedback state on /feedback_states
    The FeedbackState includes robot position, error code, and io status, etc. (see tm_msgs/msg/FeedbackState.msg)
  • publish joint states on /joint_states
  • publish 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" commands 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, and PLINE, the position value is a joint angle(J) or tool pose(T), see [[Expression Editor and Listen Node.pdf]]

Installation

Just clone the TM ROS driver of the git repository into your working directory and then build it.
The user can directly refer to the chapters introduced in the following text: steps 1 to 4 of § Usage with demo code & driver.

3. Usage

The TM ROS driver is designed to interface the TM Robot's operating software (TMflow) with the Robot Operating System (ROS) so that program developers and researchers can build and reuse their own programs to control the TM robot externally.

After installing the correct ROS version of the computer, the next step is to ensure that your hardware, control computer, and TM Robot are all properly configured to communicate with each other. See below to make sure the network settings on your computer are correct, the TM Robot's operating software (TMflow) network settings are ready and the Listen node is running.

§ TMflow Listen node setup

The Listen node: a socket server can be established and be connected with ROS by an external device to communicate according to the defined protocol. The user can make the robot communicate with the user's ROS (remote) computer equipment through a wired network when all the network parameters in the Network setting are set.

  1. Create a Listen task of flow project of TMflow software, and then drag the Listen node from the nodes menu onto the project flow, as shown below. 1

  2. Set the Network settings: mouse-click to enter the page of System ⇒ Network in order.
    Example: Set the Subnet mask: to 255.255.255.0 and IP address 192.168.10.2
    Note: Set the network mask, and the communication with the TM Robot must be in the set domain.
    2

  3. Set the Ethernet Slave Data Table Setting item: mouse-click to enter the page of Setting ⇒ Connection ⇒ Ethernet Slave in order.
    We recommend one easy method 1 to set the Ethernet Slave Data Table setting is to directly import the software package.
    1 See TM ROS Driver vs TMflow Software Usage: Import Data Table Setting.
    Or the previously provided method as follows: (Note: TMflow software version changes may have slightly different settings.)
    The user can manually click the Data Table Setting 2 item and check the following boxes as item predefined 3 to receive/send specific data:

    • 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 Turn off Ethernet Slave. Let "STATUS: Disable" be displayed on the Ethernet Slave setting page, then click Data Table Setting to enter the next page for related settings.
    3 The checked items listed above must all be selected for TM ROS setting.

    When you need to check more about the maximum, minimum, and average calculation properties of joint torque, the three checked items 4 listed below can be checked individually or all of them, please leave them unchecked when not in use.

    • Joint_Torque_Average
    • Joint_Torque_Min
    • Joint_Torque_Max

    4 This function requires TMflow 1.84 or later versions to support.

  4. Enable the Ethernet Slave settings: mouse-click to enable or disable TM Ethernet Slave. Once enabled, the robot establishes a Socket server to send the robot status and data to the connected clients and permissions to access specific robot data.
    Mouse-click to enable the Ethernet Slave setting and let STATUS:Enable. 2

  5. Press the Play/Pause Button on the Robot Stick to start running this Listen task project.

    Note: Software TMflow version changes may have slightly different settings. (SW1.76_Rev2.00) (SW1.82_Rev1.00)

§ Remote connection to TM ROBOT

Static IP of remote connection network settings through the wired network.

  1. Set the wired network of the user's (remote) Ubuntu computer by mouse-click on the top right of the desktop ⇒ Click on "Wired Settings" ⇒ Click on the gear icon ⇒ In the IPv4 feature options, click on "Manual" in order.
    user_remote_network_settings
  2. Set the Static IP settings: where the IP address is fixed for the first three yards same as the previous setting 192.168.10, last yards 3-254 machine numbers are available. (Because TM ROBOT, you have been set to 192.168.10.2)
    Example: Set the Netmask: 255.255.255.0 and IP address 192.168.10.30
    user_remote_IP_example
  3. Check Internet connection: start a terminal to test the connectivity with the target host TM ROBOT, by typing ping 192.168.10.2 ping_target_host

💡 Tip: Remember to reconfigure the network settings due to static IP changes or replacement of the ROS control PC.
As mentioned above, a valuable debugging tool is your operating system's ping command. If nothing appears to happen or an error is thrown, the robot cannot be accessed from your computer. Please go back to the top of this chapter and re-operate in the order of instructions.
If you are an experienced user, you may just need to turn off ⇒ turn on the gear icon of "Wired Settings" on your computer or to turn off ⇒ turn on the "Ethernet Slave Data Table" setting of the robot to reconfigure the hardware settings.

§ TM ROS driver usage

ROS1 driver usage

After the user has set up the ROS1 environment and built the TM driver based on the specific workspace, please enter your workspace <workspace> by launching the terminal, and remember to make the workspace visible to ROS.

source /opt/ros/melodic/setup.bash
cd <workspace>
source ./devel/setup.bash

💡 Do you prepare the TM Robot ready ? Make sure that TM Robot's operating software (TMflow) network settings are ready and the Listen node is running.

Then, run the driver to maintain the connection with TM Robot by typing

rosrun tm_driver tm_driver <robot_ip_address>

Example :rosrun tm_driver tm_driver 192.168.10.2, if the <robot_ip_address> is 192.168.10.2

Now, the user can use a new terminal to run each ROS node or command, but don't forget to source the correct setup shell files as starting a new terminal.

Usage with MoveIt

See Moveit tutorial to install the MoveIt packages.

💡 Do you prepare the TM Robot ready ? Make sure that TM Robot's operating software (TMflow) network settings are ready and the Listen node is running.
Note: The following directive settings vary slightly due to package changes. The earlier TM ROS1 TM5, TM12, TM14 descriptions, and related moveit_config packages were migrated to another repository.

To bring up the MoveIt environment in simulation mode with virtual TM Robot (Example: TM5-900), by typing

roslaunch tm5-900-moveit_config tm5-900_moveit_planning_execution.launch sim:=True

Or with virtual TM Robot (Example: TM5X-900 the eyeless model), by typing

roslaunch tm5x-900-moveit_config tm5x-900_moveit_planning_execution.launch sim:=True

📑 Note1: There are several built-in TM Robot nominal robot model settings, available for tm5-900, tm5-700, tm12 and tm14 models, as well as the eyeless models tm5x-900, tm5x-700, tm12x and tm14x models.

The user can also manipulate real TM5-900 Robot (Example: TM5-900) to run, by typing

⚠️[CAUTION] This demo will let the real TM Robot move, please be careful.

roslaunch tm5-900-moveit_config tm5-900_moveit_planning_execution.launch sim:=False robot_ip:=<robot_ip_address>

Or TM Robot (Example: TM5X-900 the eyeless model), by typing

roslaunch tm5x-900-moveit_config tm5x-900_moveit_planning_execution.launch sim:=False robot_ip:=<robot_ip_address>

The parameter <robot_ip_address> means the IP address of the TM Robot.
📑 Note2: If your real Robot is a TM12, in the above example, you should type "tm12-moveit_config" to instead of "tm5-900-moveit_config" and type "tm12_moveit_planning_execution.launch" to instead of "tm5-900_moveit_planning_execution.launch".
📑 Note3: If your real Robot is the eyeless model as a TM12X, in the above example, you should type "tm12x-moveit_config" to instead of "tm5x-900-moveit_config" and type "tm12x_moveit_planning_execution.launch" to instead of "tm5x-900_moveit_planning_execution.launch".
📑 Note4: In MoveIt planning_context.launch, TM Robot set the default to read the Xacro file, such as TM5-900 model, to read the file tm5-900.urdf.xacro into robot_description or such as TM12 model, to read the file tm12.urdf.xacro into robot_description. If the user wants to use the specific model parameters instead of the nominal model to control the robot, please refer to the following section Take generating a new Xacro file as an example of chapter 6 to modify the Xacro file.

Usage with Gazebo Simulation

See Gazebo tutorial to install the Gazebo packages.

Then, install the other joint_trajectory_controller plugin:
sudo apt-get install ros-melodic-joint-trajectory-controller
sudo apt-get install ros-melodic-rqt-joint-trajectory-controller

The tm_gazebo package contains the URDF/Xacro/SDF model files to simulate the TM Robot in Gazebo.

A simple SDF model demonstrating the generation of a virtual TM robot to Gazebo using rosrun command, by typing To open the terminal 1: Startup ROS core

roscore

In a new terminal 2: Source ROS environment settings, specify the model database path for Gazebo, then run Gazebo with ROS.

source /opt/ros/melodic/setup.bash
cd <workspace>
catkin_make
source ./devel/setup.bash
export GAZEBO_MODEL_PATH=~/<workspace>/src/tm_gazebo/models/
rosrun gazebo_ros gazebo
  1. In another new terminal 3: Source ROS environment settings, then spawn TM Robot model (Example: TM5-900) in Gazebo.
source /opt/ros/melodic/setup.bash
cd <workspace>
source ./devel/setup.bash
rosrun gazebo_ros spawn_model -database tm5-900 -sdf -model tm5-900 -x 0 -y 0 -z 0

Or directly to bring up the Gazebo environment in simulation paused mode with a virtual TM5-900 robot using roslaunch command in a terminal, by typing

Note: When opening each terminal, don't forget to set up the ROS environment first.

roslaunch tm_gazebo tm5-900_gazebo_example.launch

There are several built-in launch files that can be used to start the TM Robot simulated robot using the nominal Xacro robot model settings in Gazebo. The common command's form to bring up the TM simulated robot in Gazebo as follows:

roslaunch tm_gazebo <tm_robot_type>_gazebo.launch

The prefix <tm_robot_type> means the TM Robot type, available for the tm5-900, tm5-700, tm12, and tm14 models, as well as the eyeless models tm5x-900, tm5x-700, tm12x, and tm14x models.
For the TM5-900 Robot, simply replace the prefix accordingly to tm5-900 and type "roslaunch tm_gazebo tm5-900_gazebo.launch".
📑 Note1: If your real Robot is a TM12, in the above example, you should type tm12_gazebo.launch.
📑 Note2: If the user needs to improve end-point simulation accuracy, please refer to the following section Take generating a new Xacro file as an example of chapter 6 to modify the Xacro file.

Using Moveit! with Gazebo Simulator

You can also use MoveIt! to control the simulated robot which is configured to run alongside Gazebo.

  1. Launch the Gazebo simulation and load the ros_control controllers:
roslaunch tm_gazebo <tm_robot_type>_gazebo.launch

After the Gazebo simulator is running, proceed to the next command to launch moveit!.

  1. Launch the combined of moveit! and Gazebo to allow motion planning plugin run:
roslaunch <tm_robot_type>-moveit_config <tm_robot_type>_moveit_planning_execution_gazebo.launch

Taking the TM5-900 robot as an example, use the commands introduced above: Note: If you have started some executable programs with ROS commands in some terminal windows, it is recommended that you close them and then execute the following commands.

  1. To open the terminal 1: Running with Gazebo
    source /opt/ros/melodic/setup.bash
    cd <workspace>
    source ./devel/setup.bash
    roslaunch tm_gazebo tm5-900_gazebo.launch

  2. In a new terminal 2: Running with moveit!
    roslaunch tm5-900-moveit_config tm5-900_moveit_planning_execution_gazebo.launch

📑 Note1: Remember to close all these executables when you no longer use them for Gazebo simulations.
📑 Note2: Sometimes when gzserver is not properly shut down with ROS or cannot run Gazebo again after shutting down, you can try to kill the corresponding process with the following command.

💡 Tip: To kill both the Gazebo server and Gazebo client executables.
sudo killall -9 gazebo gzserver gzclient

4. Program script demonstration

§ Demo package description

This chapter describes the demo package and the code used as a C++ programming example, showing how to program robot scripts (TM Robot Expressions) through the TM ROS driver connection.

  • demo_send_script:
    In this demo code, it shows how to send a Listen node script to control the TM Robot.
    The user can use a service named "send_script" to send the script.
    "id" → The transaction number expressed in any alphanumeric 1 characters.
    "script" → the script that the user wants to send.
    "ok" → the correctness of the script.
    1 If a non-alphanumeric byte is encountered, a CPERR 04 error is reported. When used as a communication packet response, it is a transaction number and identifies which group of commands to respond.

  • demo_ask_item:
    In this demo code, the user can use this service to send TMSVR 2 cmd.
    2 For more detailed information, please refer to defined protocol: Expression Editor and Listen Node.pdf (Chapter 9.6 TMSVR)

  • demo_ask_sta:
    In this demo code, the user can use this service to send TMSTA 3 cmd.
    3 For more detailed information, please refer to defined protocol (Chapter7.5 TMSTA)

  • demo_connect_tm:
    In this demo code, the user can set the connection type.
    If the user sets reconnect to true, every time the driver disconnects from the Listen node, it will try to reconnect.
    There are two kinds of connection settings the user can select, one is "connect_tmsvr" for Ethernet server connection, and the other is "connect_tmsct" for TMflow connection.

  • demo_set_event:
    In this demo code, six event types can be selected.
    func → TAG, WAIT_TAG, STOP, PAUSE, RESUME and EXIT
    arg0 → if func is TAG or WAIT_TAG, arg0 is the tag number
    arg1 → if func is TAG or WAIT_TAG, arg1 is timeout in ms

  • demo_set_io:
    In this demo code, the user should set the module, type, pin, and state. 4
    module → MODULE_CONTROLBOX or MODULE_ENDEFFECTOR
    type → TYPE_DIGITAL_IN, TYPE_DIGITAL_OUT, TYPE_INSTANT_DO, TYPE_ANALOG_IN, TYPE_ANALOG_OUT, TYPE_INSTANT_AO
    pin → pin number
    state → STATE_OFF or STATE_ON value, or other value (if type expressed in a specific control module)
    4 For more detailed information, please refer to defined protocol (Chapter6.5 IO)

  • demo_set_positions:
    In this demo code, the user should pay attention to the parameter definition of the data format setting 5 and the parameter unit to be operated.
    motion_type → PTP_J , PTP_T , LINE_J , LINE_T , CIRC_J ,CIRC_T , PLINE_J ,PLINE_T
    positions → motion target position: If expressed in Cartesian coordinate (unit: m), if expressed in joint angles (unit: rad)
    velocity → motion velocity: if expressed in Cartesian coordinate (unit: m/s) 6, if expressed in joint velocity (unit: rad/s, and the maximum value is limited to π ) 6
    acc_time → time to reach maximum speed (unit: ms)
    blend_percentage → blending value: expressed as a percentage (unit: %, and the minimum value of 0 means no blending)
    fine_goal → precise position mode: If activated, the amount of error in the final position will converge more, but it will take a few more milliseconds.
    5 For more detailed information, please refer to defined protocol (Chapter8 PTP, Line, Circle, Pline, Move_PTP, Move_Line, Move_PLine)
    6 The unit of the parameters are different, the user can find the conversion in the program of TM ROS driver.

  • demo_write_item:
    In this demo code, the user can use this service to send TMSVR 7 cmd.
    7 For more detailed information, please refer to defined protocol (Chapter9.3 svr_write())

  • demo_leave_listen_node:
    In this demo code, the user can use send_script service sending a script to leave the Listen node.
    💡 If the user has sent the demo_leave_listen_node script to leave the Listen node, and you want to run the TM Robot again, please remember that the Listen task project should be resumed to run. You can press the Stop Button on the Robot Stick and then press the Play/Pause Button to resume operation.

§ Usage with demo code & driver

Note: If the user has even successfully built a specific code(tmr_ros1), the user only needs to change to the TM driver workspace path cd ~/tmdriver_ws, and then directly refer to steps 5~7 below.

  1. Type to create a root workspace directory by starting a terminal: For example, tmdriver_ws or catkin_ws, then type to change the current directory into the workspace directory path.
    mkdir ~/tmdriver_ws
    cd ~/tmdriver_ws
  2. Clone the TM driver of the git repository into the current directory by typing
    git clone https://github.com/TechmanRobotInc/tmr_ros1.git
  3. After the download done, rename the download folder tmr_ros1(or tmr_ros1-melodic) to src by typing
    mv tmr_ros1 src
    (or right-click on the download folder, select "Rename...")
  4. At the workspace directory to build the download packages and source 'setup.bash' in this workspace to make the workspace visible to ROS of this terminal 1.
    Note: Do you setsource /opt/ros/melodic/setup.bash ready? Make sure to obtain the correct setup file according to your workspace hierarchy, and then type the following below to compile.
    catkin_make
    source ./devel/setup.bash
  5. Terminal 1: Startup ROS core and type
    roscore
  6. In a new terminal 2: Source setup.bash in the workspace path and run the driver to connect to TM Robot by typing
    source ./devel/setup.bash
    rosrun tm_driver tm_driver <robot_ip_address>
    The <robot_ip_address> is the IP address of the TM Robot, the user can get it through TM Flow, for example, 192.168.10.2
  7. In another new terminal: Source setup.bash in the workspace path and type specific demo node function which the user wants to study for applications. For example: the user select to run demo_set_io, the user can type
    source ./devel/setup.bash
    rosrun demo demo_set_io
    ⚠️[CAUTION] Some demos will let the TM Robot move, please be careful.

5. TM GUI debugging and demonstration

This chapter describes a simplified GUI for displaying tm_driver connection status, sct, sta, svr messages, and robot status. The user can optionally install the ui_for_debug_and_demo package to aid in viewing messages between the driver and the robot through the GUI display. If the driver connection fails, the user can also try to send a reconnect command on this GUI for debugging.

§ GUI Debugging description

  • If the user forgets to run the TM ROS driver, the user will see all the controlled label items of the GUI displayed as "NaN".
  • The user can click the"Quit_GUI" button or click the "x" close button in the upper right corner to close this GUI.
  • If "Ethernet" and "Listen Node" connection displays are "on", it means that ROS SvrClient and SctClient are successfully connected.
  • If the"Ethernet" connection display is "off", the user should check whether the TM Robot has been started or whether the network settings are correct.
  • If the"Listen Node" connection is "off", the user should check whether the task project is running.
    💡 If "Listen Node" connection is interrupted as "Project_Run" is stopped, the "Listen Node" connection will be "off".
  • If both "Ethernet" and "Listen Node" connection displays are "on", but the "Robot_Link" is false or "Robot_Error" is true; this means the robot is working abnormally, or maybe the ESTOP button was pressed or some kind of protection or error 1 occurred. Therefore, when the user sends a move script command at this time, it will not work.
    1 For more detailed information, please refer to the TM Robot User Guide.
  • The user can use the self-developed script to read/write project data through communication protocols to control the TM Robot. If it does not work properly, the user can quickly determine whether there is a communication error code by viewing the "Response ROS Node Status" display.
  • When the user sends a command or clicks DO0 Ctrl "H/L" button of Control_Box, the user also can see the response message 2 embedded in the "Robot Response" item view.
    2 For details of this item, please refer to SctResponse.msg, StaResponse.msg and SvrResponse.msg of TM ROS driver code.
  • The user can click "clear" button to clear the old response message.
    💡 If the"Ethernet" connection is interrupted, the display of most controlled label items in the GUI will be displayed as "NaN" and the robot feedback state will remain the last state and become invalid.

§ Usage with GUI debugging

Note: If the user has even successfully built a specific code(tmr_ros1), the user only needs to change to the TM driver workspace path cd ~/tmdriver_ws, and then directly refer to steps 5~7 below.

  1. Type to create a root workspace directory by starting a terminal: For example, tmdriver_ws or catkin_ws, then type to change the current directory into the workspace directory path.
    mkdir ~/tmdriver_ws
    cd ~/tmdriver_ws
  2. Clone the TM driver of the git repository into the current directory by typing
    git clone https://github.com/TechmanRobotInc/tmr_ros1.git
  3. After the download done, rename the download folder tmr_ros1(or tmr_ros1-melodic) to src by typing
    mv tmr_ros1 src
    (or right-click on the download folder, select "Rename...")
  4. At the workspace directory to build the download packages and source 'setup.bash' in this workspace to make the workspace visible to ROS of this terminal 1.
    Note: Do you setsource /opt/ros/melodic/setup.bash ready? Make sure to obtain the correct setup file according to your workspace hierarchy, and then type the following below to compile.
    catkin_make
    source ./devel/setup.bash
  5. Terminal 1: Startup ROS core and type
    roscore
  6. In a new terminal 2: Source setup.bash in the workspace path and run the driver to connect to TM Robot by typing
    source ./devel/setup.bash
    rosrun tm_driver tm_driver <robot_ip_address>
    The <robot_ip_address> is the IP address of the TM Robot, the user can get it through TM Flow, for example, 192.168.10.2
  7. In another new terminal 3: Source setup.bash in the workspace path and start GUI debug by typing
    source ./devel/setup.bash
    rosrun ui_for_debug_and_demo robot_ui

6. TM Robot corrected kinematics value loading and robot description file generation

Real kinematic values vary from TM robot to another one as each robot is calibrated at the factory.
This chapter describes that the user can use a script program to extract specific kinematic values from your TM robot. The Python script function automatically generates a new URDF or Xacro robot model description file using a specific set of commands.

If the user just wants to use the TM Robot nominal model to control the robot, the user can skip the rest of this chapter.

§ Corrected kinematics value description

The precise kinematic parameters of a robot are useful for improving the end-point accuracy of the robot.
Due to manufacturing tolerances during manufacturing and the installation error in the robot assembly process, the positioning accuracy and precision of the mechanism will be affected. The error between the reality and the nominal robot model is significantly reduced by the corrected robot description. The kinematic parameter compensated deviations of the robot can improve the absolute positioning accuracy of the robot.
If the user needs to improve simulation accuracy or end effector tracking performance, it is recommended that the user import the corrected calibrated kinematic parameters from the real TM Robot to replace the nominal set of D-H parameters. Techman Robot provides a URDF file that configures the TM Robot model with a set of nominal DH parameters, and one that uses the programming scripts to obtain calibrated kinematic parameters from a parameter server connected to your TM robot and perform a set of overrides to output a new corrected URDF file.

The common Python script is used as follows:

python2 <script_name> <urdf_from> <urdf_gen>
  • <script_name> : Provide modify_xacro.py or modify_urdf.py two Python scripts program as options.
  • <urdf_from>: The first argument represents the original URDF model form of the TM Robot, and the file part naming 1 is <urdf_from>.
    1 There are several built-in TM Robot nominal robot model settings, available for tm5-900, tm5-700, tm12, and tm14 models, as well as the eyeless models tm5x-900, tm5x-700, tm12x and tm14x models.
    For example, select the tm12 nominal robot model as the input model form, the user can type tm12 as the <urdf_from>. For details of this item, please refer to the modify_urdf.py or modify_xacro.py code.
  • <urdf_gen>: The second argument means the newly generated URDF model form of the TM Robot, and the file 2 name is <urdf_gen>.
    2 For example, if the user names it test and select modify_xacro.py as script program, a test.urdf.xacro robot description file will be generated.

The Python script for more specific arguments is used as follows:

python2 <script_name> <urdf_from> <urdf_gen> <specific_para>
  • <specific_para>: The third argument is provided for use in some special cases. Please refer to the scripting program 3 for details of this item.
    3 For a simple third argument example, type the argument "-M" as follows:
    Example : python2 modify_xacro.py tm5-900 test -M
    → A robot description file "macro.test.urdf.xacro" will be generated, and the string 'macro.' is prepended to the <urdf_gen> name.

§ Create with specific kinematic parameters of the local TM Robot

💡 Do you run the driver to maintain the connection with TM Robot, make sure that TM Robot's operating software (TMflow) network settings are ready and the Listen node is running.

  • Take generating a new Xacro file as an example

The following steps describe how to import specific kinematic values using a real TM5-900 Robot following the procedure below and select the corresponding type tm5-900 as an example of <urdf_from>.

  1. Terminal 1: Startup ROS core and type
    roscore
  2. In a new terminal 2: Source setup.bash in the workspace path and run the driver to connect to TM Robot by typing
source /opt/ros/melodic/setup.bash
cd <workspace>
source ./devel/setup.bash
rosrun tm_driver tm_driver <robot_ip_address>

The parameter <robot_ip_address> means the IP address of your TM Robot, the user can get it through TM Flow.

  1. In another new terminal 3: source setup.bash in the workspace path, change the current directory to the directory path of the python script to get the specific kinematic parameters of your TM Robot, and then enter the specified command format to generate a new name by the <urdf_gen> argument, for example, named user_defined.
source /opt/ros/melodic/setup.bash
cd <workspace>
source ./devel/setup.bash
cd src/tm_description/scripts
python2 modify_xacro.py tm5-900 user_defined

When this procedure is completed, the user can find that the newly generated named robot description file has been saved, e.g."user_defined.urdf.xacro".
📑 Note: In the previous chapter, we renamed the download folder tmr_ros1 (or tmr_ros1-melodic) to src. If the user misses this step, they will encounter such an error "[Error] [modify_xacro]: workspace directory not find " on the screen when executing the above command.

  1. Next, the user must modify the filename part of the default pre-built nominal robot model in tm5-900.urdf.xacro to a newly generated robot model description naming file.
cd src\tm_description\xacro\
sudo vim tm5-900.urdf.xacro

or use gedit text editor instead of vim to edit the file contents, by typing

sudo gedit tm5-900.urdf.xacro

📑 Note1: If your real Robot is a TM5-700, in the above example, you should type tm5-700 as an example for <urdf_from> and modify the tm5-700.urdf.xacro file.
📑 Note2: If your real Robot is the eyeless model as a TM5X-700, in the above example, you should type tm5x-700 as an example for <urdf_from> and modify the tm5x-700.urdf.xacro file.

Please refer to the following to modify the content format of the filename line:

# Before modification : (Take the pre-built TM5-900 nominal robot model as an example) 
  <xacro:include filename="$(find tm_description)/xacro/macro.tm5-900-nominal.urdf.xacro" />
# After modification : (Replace with your actual newly generated Xacro file)
  <xacro:include filename="$(find tm_description)/xacro/user_defined.urdf.xacro" />

Finally, the user can launch the modified robot file "tm5-900.urdf.xacro" to run your TM Robot or simulate the robot more accurately.

💡 Tip: Remember to recompile since the code has been changed.
Please go back to your specific workspace. Then you can clean the build and devel directories with rm -r build devel before executing catkin_make.

  • Take generating a new URDF file as an example

The following steps describe how to import specific kinematic values using a real TM5-900 Robot following the procedure below and select the corresponding type tm5-900 as an example of <urdf_from>.

  1. Terminal 1: Startup ROS core and type
    roscore
  2. In a new terminal 2: Source setup.bash in the workspace path and run the driver to connect to TM Robot by typing
source /opt/ros/melodic/setup.bash
cd <workspace>
source ./devel/setup.bash
rosrun tm_driver tm_driver <robot_ip_address>

The parameter <robot_ip_address> means the IP address of your TM Robot, the user can get it through TM Flow.

  1. In another new terminal 3: source setup.bash in the workspace path, change the current directory to the directory path of the python script to correct urdf, and then enter the specified command format to generate a new named URDF with arguments, for example, named user_defined.
source /opt/ros/melodic/setup.bash
cd <workspace>
source ./devel/setup.bash
cd src/tm_description/scripts
python2 modify_urdf.py tm5-900 user_defined

When this procedure is completed, the user can find that the newly generated named robot description file has been saved, e.g."user_defined.urdf".

📑 Note1: If your real Robot is a TM12, in the above example, you should type tm12 as an example for <urdf_from>.
📑 Note2: If your real Robot is the eyeless model as a TM12X, in the above example, you should type tm12x as an example for <urdf_from>.

Finally, the user can use the new robot file, such as "user_defined.urdf", instead of the default nominal URDF model to run your TM Robot or simulate the robot more accurately.

💡 Tip: Remember to recompile since the code has been changed.
Please go back to your specific workspace. Then you can clean the build and devel directories with rm -r build devel before executing catkin_make.

§ Import information available on the screen

  • How can the user confirm that the data conversion process has been completed?
    Ans: The user can find the string "File saved with new kinematic values." displayed on the screen.
  • How can the user find the location of the newly generated named robot description file?
    Ans: The user can first find the displayed string "[new save file path:] " on the screen, and the following string is the file save location.

7. Contact us / Technical support

More Support & Service, please contact us. @TECHMAN ROBOT[https://www.tm-robot.com/zh-hant/contact-us/]

tmr_ros1's People

Contributors

kentsai0319 avatar leowutmrobot avatar techmanrobotincowner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

tmr_ros1's Issues

Obtaining camera feed from built-in uEye camera

First of all, thanks for developing this ROS driver, it works very well.

Now I would like to process the camera feed of the uEye camera on ROS as well.
How can I setup the TM arm to broadcast its camera feed? Having the ability to query to current picture would also suffice.
I see some images in the figures/ tab about connecting the camera feed to an external API, but I see no documentation of this.

The TM_Robot_Expression.pdf

Hi~, Thanks for your package, I have a request that could you upload the TM_Robot_Expression.pdf because I cannot get the match version of the mentioned pdf in the code.

[Question] Does the robot arm have a cartesian velocity command interface?

Hello Developers.

First of all, I would like to apologize for posting this question that is not suitable for posting to issue.

I have a plan to purchase the TM12 robot arm for my research.
Before purchasing, I would like to confirm the interfaces of the robot arm.
Does this driver have a cartesian or joint velocity(on-the-fly) command interface?

Thanks in advance.

TM Moveit! with Gazebo Simulator drivers don't work

I'm Nutai engineer, and I come from Spain.
I'm using Ubuntu 20.04, ROS Noetic.
My problem happened using Moveit! with Gazebo Simulator in Ubuntu 20.04, ROS Noetic.

In terminal 1:

source /opt/ros/noetic/setup.bash
cd <my_workspace>
source ./devel/setup.bash
roslaunch tm_gazebo tm5-900_gazebo.launch

I get this logs:
Captura de pantalla 2023-07-10 172834

The robot appears in Gazebo apparently correctly.
Captura de pantalla 2023-07-10 172950

In terminal 2:

source /opt/ros/noetic/setup.bash
cd <my_workspace>
source ./devel/setup.bash
roslaunch tm5-900-moveit_config tm5-900_moveit_planning_execution_gazebo.launch

After this commands, I get this logs:
In terminal 2, these logs appear in loop:
Captura de pantalla 2023-07-10 173257

In terminal 1:
Captura de pantalla 2023-07-10 173516

After that, the ROS scripts executed in new terminals have not produced any robot movement in Gazebo. These scripts have been used with the same procedure with Gazebo and MoveIt! drivers from another robot, working correctly.
Any help on this would be much appreciated.

RViz real TM12 1300 doesn't move

Hi, as i written in the title I'm currently trying to move a real TM12 1300 with ROS RViz.
I have installed all the requested packages (ros-melodic-desktop-full, ros-melodic-moveit, ros-melodic-industrial-core, tmr_ros1) under Ubuntu 18.04 without errors.
When I launch ROS with

source /opt/ros/melodic/setup.bash
source ${HOME}/src/BTRobot/devel/setup.bash
roslaunch tm12_moveit_config tm12_moveit_planning_execution.launch sim:=False robot_ip:=<RobotIP>

the robot is drawn into the RViz but in a wrong position (the home position) instead of the normal pose (which is his real position); when i move the 3d model into the RViz and clicking the Plan & Execute button the RViz writes that the script was executed succesfully, but the real robot doesn't move.

My PC and the robot are in the same LAN, no connection errors occur

TM5-700 moveit package

Hi, not sure if this the right place to post, but cant find the comments section so posting here,
Can please share the TM5-700 moveit package

Closed ports

This is not so much an issue with the driver as with the ports on the tm5-900 controller. After having an issue where no connection was established i ran an nmap -Pn robot-ip and it returned a list of open ports (as i understood it) and none of them were 5890 or 5891 (or 502 for that matter (Modbus slave))
Is there a quick and easy fix for this issue?
Am i missing something that is not in the manual or is it a robot controller factory setup issue?

Not able to move the robot

My problem is XXX, and it happened in Ubuntu 20.04, ROS Noetic.
Hi I'm a robotic engineer from Spain, and I'm trying to control my tm5-900 robot with the ros driver (Ubuntu 20.04 ROS Noetic). After some problems with the ethernet ports I kind of manage to connect to the robot, I mean, I'm able to read the robot poses but I'm not able to move the robot via the /follow_joint_trajectory/ action server.

These are my screenshots when connecting running the ros_driver

Screenshot from 2023-09-12 15-19-09

I also tried with the tm5-900_moveit_planning_execution.launch , the rviz robot starts with the the real robot position but It fails when executing the trajectory. Here another screenshots:

image

Note that, when creating the listen_task in the TMFLOW software, I had to eliminate the stop conditions in order to work (receive the joints) if not the program was stopping after a few seconds. However, removing the stop conditions allowed me to receive the current joints.

What I am missing? does the tmr robot needs to be in any specific mode?

Error occurs when executing launch file

Hello @TechmanRobotIncOwner,
When we run "roslaunch tm5_900_moveit_config tm5_900_moveit_planning_execution.launch sim:=True" in tutorial, we encountered an issue as follows:

Undefined substitution argument transmission_hw_interface
when processing file: /home/lab605/TM_ws/src/tmr_ros1/tm5_description/urdf/tm5_900_robot.urdf.xacro
RLException: while processing /home/lab605/TM_ws/src/tmr_ros1/tm5_900_moveit_config/launch/planning_context.launch:
Invalid <param> tag: Cannot load command parameter [robot_description]: command [['xacro', '/home/lab605/TM_ws/src/tmr_ros1/tm5_description/urdf/tm5_900_robot.urdf.xacro', 'stl_mesh:=false']] returned with code [2]. 

Param xml is <param command="xacro '$(find tm5_description)/urdf/tm5_900_robot.urdf.xacro' stl_mesh:=$(arg stl_mesh)" if="$(arg load_robot_description)" name="$(arg robot_description)"/>
The traceback for the exception was written to the log file

It seems like there are some argument errors in launch file. How can we solve this problem?
We appreciate your help!

Wrong dependency in tmr_description

The tmr_description package requires tmr_msgs package. However this package does not exist, rather it's named tm_msgs, leading to a build failure as the package is not found.

The following lines need to be modified or the tm_msgs package needs to be renamed to tmr_msgs.

Question about compatibility

I've been using this deprecated repository in the past to control a TM5-900, it worked well. I wanted to get the latest developments from the current repo, however it seems it is not quite as compatible... could anybody confirm if I need anything special to get it working?

My command is the following: roslaunch tm_driver tm5_900_bringup.launch robot_ip:=192.168.29.130

This is the response I get when trying to connect to the robot with the package:

[ INFO] [1608510596.564114104]: TM_ROS: robot_ip:=192.168.29.130
[ INFO] [1608510596.564138041]: TmCommunication::TmCommunication
[ INFO] [1608510596.564147077]: TmCommunication::TmCommunication
[ INFO] [1608510596.566706255]: TM_ROS: set base_frame to base
[ INFO] [1608510596.567343849]: TM_ROS: set tool_frame to tool0
[ INFO] [1608510596.567356071]: TM_DRV: halt
[ INFO] [1608510596.567360810]: TM_DRV: start
[ INFO] [1608510596.567364390]: TM_SVR: start
[ INFO] [1608510596.567372362]: TM_COM: ip:=192.168.29.130
[ INFO] [1608510596.567695305]: TM_COM: rv:=-1
[ INFO] [1608510596.567705264]: TM_COM: O_NONBLOCK connection is fail
[ INFO] [1608510596.569312660]: TM_ROS: publisher thread begin
[ INFO] [1608510596.569364821]: TM_ROS: (TM_SVR): is not connected
[ INFO] [1608510596.569372284]: TM_ROS: (TM_SVR): reconnect in 
[ INFO] [1608510596.569381287]: 3.0 sec...
[ INFO] [1608510596.619428697]: TM_ROS: sct_response thread begin
[ INFO] [1608510596.619453304]: TM_ROS: (TM_SCT): is not connected
[ INFO] [1608510596.619460260]: TM_ROS: (TM_SCT) reconnect in 
[ INFO] [1608510596.619467062]: 3.0 sec...
[ INFO] [1608510597.122629467]: 2.5 sec...
[ INFO] [1608510597.676502149]: 2.0 sec...
[ INFO] [1608510597.726761399]: 2.0 sec...
[ INFO] [1608510598.230302886]: 1.5 sec...
[ INFO] [1608510598.787011536]: 1.0 sec...
[ INFO] [1608510598.836567544]: 1.0 sec...
[ INFO] [1608510599.340367464]: 0.5 sec...
[ INFO] [1608510599.895135950]: 0 sec
TM_ROS: (TM_SVR): connect(1000)...
[ INFO] [1608510599.895258054]: TM_COM: ip:=192.168.29.130
[ INFO] [1608510599.895645066]: TM_COM: rv:=-1
[ INFO] [1608510599.895724682]: TM_COM: O_NONBLOCK connection is fail
[ INFO] [1608510599.895772205]: TM_ROS: (TM_SVR): is not connected
[ INFO] [1608510599.895802391]: TM_ROS: (TM_SVR): reconnect in 
[ INFO] [1608510599.895873842]: 3.0 sec...
[ INFO] [1608510599.944422885]: 0 sec
TM_ROS: (TM_SCT) connect(1000)...

I can ping the robot PC, nothing has changed besides the ROS driver.

I noticed that perhaps the ports were different: in the deprecated repo it was 6188 and in the current one it is 5890 and 5891. This is all very confusing and I hope i don't need to revert to the deprecated driver.

Problem with listner(srv)

I am studying how to program Techman , and I come from University of technology(Poland).
My problem is listener, and it happened in Ubuntu 20.04, ROS Noetic.

I am trying control Techman with code, using this tutorial "https://github.com/TechmanRobotInc/tmr_ros1/tree/noetic" and "https://github.com/jvdtoorn/techmanpy". I can just say to robot there hi must go, but i can not get any callback from robot.
I have that communicate:
377149502_861072255536759_9042084797585170342_n

always sending me "reconnecting", how i can fix this?

and other communication from code:

378130928_120267787840705_1025974738152423519_n

It hapend when a techman come from one of my science club event.

DH Parameters are not consistent between different TM data sources

I am an Engineer working with the TM Cobot series, currently developing simulation tools for motion planning and research.

Recently, our code was tested against a physical arm (TM5X-900) and it was noticed that the dimensions used in the TMFlow software did not match the datasheets. It was then discovered that the RoboDK TM model also had different dimensions, as well as the tmr_ros2 project here. There appears to also be a strange Python script here that edits the URDF to match the tmr_ros2 dimensions, but this is not mentioned in any of the datasheets or manuals (I.E. that the CAD and datasheets are incorrect and the script is needed to 'fix' them).

In particular, there are 6 control dimensions which drive the kinematic model. The table below shows the versions discovered so far:

Data source D1 D2 D3 D4 D5 D6
TM ROS version 1 145.20 429.00 411.50 122.30 106.00 113.15
RoboDK TM model 145.20 429.00 411.00 122.30 106.50 114.15
TM Flow 145.09 429.01 411.50 122.20 106.00 114.40
TM ROS version 2 145.10 429.00 411.50 122.20 106.00 114.40

This would appear to be the root cause for the open issue #15 as well, and might also affect solutions to #16 and #20 . What is the official 'correct' source for the DH models for this hardware series?

Furthermore, if a Python script exists to modify the URDF, can the modifications be applied directly to the URDF tag section to prevent storing the wrong version?

Whilst not technically a problem on github, This should also be propagated to the datasheets online where possible.

Relevant serials:

Serial Number (Controller) – BC2137046
Serial Number (Robot Arm) – BA2137046
TM Firmware Version – V1.84.2200

Difference between `tmr_description` and e.g. `tm5_description` ?

Hello @TechmanRobotIncOwner,

There seems to be some redundancy between tmr_description, and tm5_description / tm12_description. I have some quick questions regarding this:

1: If I want to run the ROS driver against a TM5, which description package should I be using?

The tm5_700_moveit_config uses tm5_description. However, I'm interested in applying the error compensation discussed in #15, and it seems the intended script for that lives in tmr_description which makes assumptions that are not valid for the tm5_description URDF layout (see below).

2: It seems the structure of the URDFs are completely different between the tmr_description and the other description packages.

For instance,

  • joint names:
    • tmr_description: joint_1, joint_2, joint_3, ...
    • tm5_description: shoulder_1_joint, shoulder_2_joint, elbow_joint, ...
  • relative joint position/orientations:
    • The kinematic chain seems to be defined quite differently. See the below image which shows the visual part for the same part of the robot, as defined in tm5_description and tmr_description respectively:

image

3: Can you give some history of why these seemingly overlapping packages exist?

It's currently a little bit confusing to understand what you should focus on and what is potentially old/deprecated code. A short explanation here would help a lot I think!

Thank you for reading!

tm_driver unable to connect to TM12

Hi,
I am an engineer working on a project using the TM12 robot. I am not able to get remote connection to the robot. I am using Ubuntu 18.04 and ROS melodic.
I have followed every step in the tutorial. I am running the listening node, set the ethernet slave and imported the data table settings. I am able to ping the robot ip from the remote computer.

When I run
rosrun tm_driver tm_driver 10.0.0.20
I get the following output

Screenshot from 2022-08-15 12-34-20

Any suggestion on why this is happening? Any help would be appreciated.

`tool0` and `wrist_3_link` are not aligned

Alternative title: "Published tool0 does not match URDF + /joint_states"

Hello,

There seems to be a discrepancy between the Techman controller and ROS driver in terms of how they calculate the tool pose.

I'm using a TM5, but have observed this same issue on TM12 as well.

roslaunch tm5_700_moveit_config tm5_700_moveit_planning_execution.launch sim:=False robot_ip:=...

By setting the TCP to all-zeros from the Techman UI, I expect the tool0 and wrist_3_link frames to be identical. However, there is a discrepancy of about 1~3 mm for TM5 in all dimensions, depending on the pose of the robot (3~6 mm for TM12).

image

This is strange since the joint values published to /joint_states matches perfectly with the joint values shown in the Techman UI.

As I see it, this hints at potentially any of these:

  1. Techman controller uses a different method of calculating forward kinematics
  2. Robot URDFs are not truthful
  3. The robot is damaged, needs re-zeroing, or something similar.

All of these feel unlikely though. One would think that the Techman controller performs the exact same FK as the ROS side does when calculating and publishing tool0, but that doesn't seem to be the case.

Could you provide some comments as to why this might be happening?

'arm_controller/command' topic on real robot

We want to control a tm5-900 at 10 Hz.
When a new command comes in,
the robot should immediately follow the latest command,
forgetting about past commands.

To realize the above concept,
I first experimented with python scripts in a gazebo environment using the following command.

// command
roslaunch tm_gazebo tm5-900_gazebo.launch

We have so far confirmed the desired 10 Hz operation with the following script.

// python script

from trajectory_msgs.msg import JointTrajectory
pub = rospy.Publisher('arm_controller/command', JointTrajectory, queue_size=10)
while True:
... // determination of arrival
... // get pose_current and pose_target, create pose_next, compute IK
pub.publish(msg_jointtrajectory) // at 10 Hz

Next, we want to do the same thing as above with an real robot.
We verified the connection with the robot using the following command.

// command (each terminal)
roscore
rosrun tm_driver tm_driver my_robot_ip

If we check the rostopic list in this situation,
there is no 'arm_controller/command' topic,
and it is not possible to execute the same as in the gazebo environment.

Is there an alternative approach or use of 'arm_controller/command'
in a real robot environment?

Joint angles wrong

I have successfully connected to my TM5-900 using this package and following the instructions in the README.md, but it looks like the reported joint angles are wrong, I don't know about the velocities and torques...

This is what the robot looks like:
tm5-900

And this is what RViz reports:
rviz

At first, I thought the joint order was wrong, as when I tried to manually move the J1 joint (shoulder_1_joint) it moved the J2 (shoulder_2_joint).

I tried to swap the lines in here, but then I saw combined movements of multiple joints in RViz...

When checked with rostopic echo /joint_states I get the following:

name: [shoulder_1_joint, shoulder_2_joint, elbow_joint, wrist_1_joint, wrist_2_joint, wrist_3_joint]
position: [6.171496059487189, 0.5187536200480904, 10.582116397800602, -2.958383948507209, 0.11735999982528693, 1.5004451981749274]
velocity: [-0.0, -6.220975319068639e-06, -0.0, 0.0, 9.696273856980042e-06, 9.696273856980042e-06]
effort: [6.43369921875, -11.68569921875, -33.8753984375, -3.3955200195312503, -0.9072000122070313, -0.9331199951171876]

These are in radians, the robot reports completely different angles and none of them above 90 degrees.

Has this package been tested with TM5-900? Am I missing something?

The `tm_driver` fails to communicate with a TM12

Failure on communication with TM12

I need some assistance to find out why I cannot communicate properly with TM12. Please, read the Setup section to know whether there is a missing step that I overlooked, and the Errors section to see how TM Driver reports the error.

Setup

I have a TM12 with its control box up and running, configured properly to manually run.

Network setup

Let's say that the Ethernet interface where the TMFlow sets the Ethernet Listener server is connected to a client PC which runs Ubuntu 18.04 and ROS melodic. The ethernet network card of client PC and the ethernet interface of the controller are set correctly in the same subnet:

client PC: 192.168.x.1 and control box: 192.168.x.105.
A check that passes OK is that client PC can ping and receive answer from control box.

In the controller PC, the settings for the ethernet slave has been setting according to the documentation in the read me, including settings exactly the same list of data to report, creating a project with Listener as the main component, and starting the ethernet server reporting (Status: Enabled) and showing in the log a message:

[<timestamp>] Ethernet Slave opens on: 192.168.x.105:5891

A check that passes OK is that client PC can manually connect to that port with nc 192.168.x.105 and a stream of binary data arrives properly. Also when opting for String or for Json the stream of data changes the serialization and can be human readable properly.

Launching tm_driver

In client PC the software of this repository is compiled, after manually needing to patch the package.xml to add the commented out packages (not sure why they are commented out when CMakeLists.txt requires them). The robot description is launched in client PC and then the tm_driver is launched in client PC against its own ROS core.

roslaunch tm12_description tm12_upload.launch

and then:

roslaunch tm_driver tm12_bringup.launch robot_ip:=192.168.x.105

Errors

In Binary mode

The result of the second command logs:

process[tm_driver-2]: started with pid [26156]
[ INFO] [1606142806.442577147]: TM_ROS: robot_ip:=192.168.x.105
[ INFO] [1606142806.442611108]: TmCommunication::TmCommunication
[ INFO] [1606142806.442641005]: TmCommunication::TmCommunication
[ INFO] [1606142806.446168895]: TM_ROS: set base_frame to base
[ INFO] [1606142806.447201083]: TM_ROS: set tool_frame to tool0
[ INFO] [1606142806.447221986]: TM_DRV: halt
[ INFO] [1606142806.447232141]: TM_DRV: start
[ INFO] [1606142806.447239719]: TM_SVR: start
[ INFO] [1606142806.447261063]: TM_COM: ip:=192.168.x.105
[ INFO] [1606142806.447652459]: TM_COM: rv:=0
[ INFO] [1606142806.447666420]: TM_COM: Connection is ok
[ INFO] [1606142806.447675202]: TM_COM: O_NONBLOCK connection is ok
[ INFO] [1606142806.447685266]: TM_COM: TM robot is connected. sockfd:=10
[ INFO] [1606142806.447710346]: $TMSVR,24,Play,2,Stick_PlayPause=1,*11

[ INFO] [1606142806.447733539]: TM_SCT: start
[ INFO] [1606142806.447749399]: TM_COM: ip:=192.168.x.105
[ INFO] [1606142811.470569198]: TM_COM: rv:=-1
[ WARN] [1606142816.476277714]: TM_COM: Connection timeout
[ INFO] [1606142816.476411965]: TM_COM: O_NONBLOCK connection is fail
[ INFO] [1606142816.495713197]: TM_ROS: publisher thread begin
[ INFO] [1606142816.495872511]: TM_ROS: (TM_SVR): (Play) (0) ModeError;Stick_PlayPause
[ INFO] [1606142816.546066786]: TM_ROS: sct_response thread begin
[ INFO] [1606142816.546197037]: TM_ROS: (TM_SCT): is not connected
[ INFO] [1606142816.546235030]: TM_ROS: (TM_SCT) reconnect in 
[ INFO] [1606142816.546272553]: 3.0 sec...
[ INFO] [1606142817.754346525]: 2.0 sec...
[ INFO] [1606142818.964702755]: 1.0 sec...
[ INFO] [1606142820.180460892]: 0 sec
TM_ROS: (TM_SCT) connect(1000)...
[ INFO] [1606142820.180621233]: TM_COM: ip:=192.168.x.105
[ INFO] [1606142821.198290859]: TM_COM: rv:=-1
[ WARN] [1606142822.199559454]: TM_COM: Connection timeout
[ INFO] [1606142822.199697054]: TM_COM: O_NONBLOCK connection is fail
[ INFO] [1606142822.199748554]: TM_ROS: (TM_SCT): is not connected
[ INFO] [1606142822.199797346]: TM_ROS: (TM_SCT) reconnect in 
[ INFO] [1606142822.199848506]: 3.0 sec...
[ INFO] [1606142823.413549785]: 2.0 sec...
[ INFO] [1606142824.625990305]: 1.0 sec...
[ INFO] [1606142825.838793145]: 0 sec
TM_ROS: (TM_SCT) connect(1000)...

Showing that the communication is not working as expected. It reports Connection timeout. But as explained before, when manually connecting to that port the information exists.

In String or Json mode

Furthermore, when changing the communication mode in TMFlow to either String or Json, the reported error changes to the next:

process[tm_driver-2]: started with pid [26497]
[ INFO] [1606147147.490524114]: TM_ROS: robot_ip:=192.168.x.105
[ INFO] [1606147147.490560455]: TmCommunication::TmCommunication
[ INFO] [1606147147.490589362]: TmCommunication::TmCommunication
[ INFO] [1606147147.493734787]: TM_ROS: set base_frame to base
[ INFO] [1606147147.494779417]: TM_ROS: set tool_frame to tool0
[ INFO] [1606147147.494797615]: TM_DRV: halt
[ INFO] [1606147147.494810074]: TM_DRV: start
[ INFO] [1606147147.494820180]: TM_SVR: start
[ INFO] [1606147147.494838319]: TM_COM: ip:=192.168.x.105
[ INFO] [1606147147.495186428]: TM_COM: rv:=0
[ INFO] [1606147147.495199780]: TM_COM: Connection is ok
[ INFO] [1606147147.495211233]: TM_COM: O_NONBLOCK connection is ok
[ INFO] [1606147147.495222191]: TM_COM: TM robot is connected. sockfd:=10
[ INFO] [1606147147.495248826]: $TMSVR,24,Play,2,Stick_PlayPause=1,*11

[ INFO] [1606147147.495271206]: TM_SCT: start
[ INFO] [1606147147.495287727]: TM_COM: ip:=192.168.x.105
[ INFO] [1606147152.718565215]: TM_COM: rv:=-1
[ WARN] [1606147157.723057396]: TM_COM: Connection timeout
[ INFO] [1606147157.723225256]: TM_COM: O_NONBLOCK connection is fail
[ INFO] [1606147157.744940721]: TM_ROS: publisher thread begin
[ INFO] [1606147157.745328478]: TM_ROS: (TM_SVR): (1): invalid mode (2)
[ INFO] [1606147157.745407084]: TM_ROS: (TM_SVR): (Play) (0) ModeError;Stick_PlayPause
[ INFO] [1606147157.745470186]: TM_ROS: (TM_SVR): (2): invalid mode (2)
[ INFO] [1606147157.745527441]: TM_ROS: (TM_SVR): (3): invalid mode (2)
[ INFO] [1606147157.745568797]: TM_ROS: (TM_SVR): (4): invalid mode (2)
[ INFO] [1606147157.745831903]: TM_ROS: (TM_SVR): (5): invalid mode (2)
[ INFO] [1606147157.745905418]: TM_ROS: (TM_SVR): (6): invalid mode (2)
[ INFO] [1606147157.745939923]: TM_ROS: (TM_SVR): (7): invalid mode (2)
[ INFO] [1606147157.745996956]: TM_ROS: (TM_SVR): (8): invalid mode (2)
[ INFO] [1606147157.746280322]: TM_ROS: (TM_SVR): (9): invalid mode (2)
[ INFO] [1606147157.746330858]: TM_ROS: (TM_SVR): (0): invalid mode (2)

Which indicates that the connection is established but not understood.

Any suggestions?

joint_trajectory_action/result returning before motion complete

When trying to control the TM arm using Moveit, the execute commands end up finishing before the arm movement is actually completed, this leads to issues with larger movements as executions following this will try to run before the arm finishes moving.
I've tested this with just using Moveit through RViz and when executing the motion, the joint_trajectory_action/result gets published to before the move is finished.

Can't get moveit to work with the tool_pose pose output

I'm trying to setup moveit control so that I can use tool_pose to get the positions of the robot, then use these values for setting the position of the robot through moveit.
The tool_pose output (which it states the frame_id is "base"):

  position: 
    x: -0.4265612487792969
    y: 0.12488037109375
    z: 0.319642578125
  orientation: 
    x: -0.0005005435936691659
    y: 0.9999888259891793
    z: 0.004190976781786781
    w: 0.002129099929145922

And the same position with what moveit outputs from move_group_interface.getCurrentPose() which is relative to the world

  position: 
    x: -0.34069897263606064
    y: 0.16769051188681533
    z: 0.461088310767565
  orientation: 
    x: 0.9238760637932933
    y: -0.3826917892535815
    z: -0.0001079185120021367
    w: 3.925936506249497e-05

When using the tool_pose in moveit, it puts it in (what seems to be) a 45° offset from it's actual position.

My assumption from this is to use setPoseReferenceFrame("base"), however this still sends it to the same position, and when looking at RViz you can see that the apparent world and base frames are in the same position. The only other logical reference I could think of was "base_link", but this is rotated 90° in the wrong axis so I'm not sure what tool_pose is actually in relation to?

Any help on this would be much appreciated :)

About the simulate tm5-900 with robotiq_85 in the gazebo11

Hi I am CHENG,HSIANG-YUN from Taiwan. I have some question about the tm5-900 model in gazebo11.
when I give it pid parameter to control robot arm that use gazebo_ros_control.yaml.
but the model in gazebo always have some shakes especially wrist_1 wrist_2 and wrist_3.
so when i take the gripper which is named robotiq_85 into the end effector of the tm5-900 in the gazebo11,
always be shaked too.
I can't control the gripper when it install on tm5-900 model.
My question is
----1. Does the robot_description which is named macro.tm5-900-nominal.urdf.xacro or tm5-900-nominal.urdf file have any problem to
its inertia or mass or mesh or pid parameter?
(I think transmission or gazebo plugin doesn't have any problem)
----2. if question1 doesn't , please let me know how to fix a shake about tm5-900 in the gazebo 11.
I need to integrate the tm5-900 with robotiq_85 for my research.
please help me solve this problem.
p.s I don't use TM-flow.I need to simulate tm5-900 in gazebo to collect the data and use script file to run the simulation
version
-----ubuntu 20.04
-----ros noetic
-----gazebo classic 11
-----tmr_ros1 noetic
figure1 tm5-900 in gazebo(rqt trajectory)
I sorry to the picture can't easy see the problem
image
figure 2 tm5-900 with robotiq_85 in gazebo
image
figure 3 ur5 with robotiq_85 in gazebo
I want to make tm5-900 like this one
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.