Universal Robots Forum

Need help to change the robot's jogging reference frame of "twist_controller" from the ROS side

Hello everyone.
I need some help to change the robot’s jogging reference frame of “twist_controller”.

For now, i have to implement some robot application based on “Universal_robot_ROS_driver” which i was cloned from a beta-testing branch 2 months ago.

My setup:
I used UR3 robot (CB3 polyscope 3.8) with ROS melodic on Ubuntu 18.04 and bringup with “ur_robot_driver” as mentioned.
I switched the ROS controller manager to “twist_controller” which required a type of input topic “Geometry_msgs/Twist” type to control the TCP’s velocity. Thus, i used my 6D joystick and “spacenav_node” ROS package to get some twist data then remapped to “/twist_controller/command”

My result:
I actually jogging the robot’s TCP but the input “twist” still reference by the “base” frame and that is my problem.

My expectation:
I need to jog the robot’s TCP but reference by TCP frame itself with “twist_controller” from the ROS side.

This is my video that demonstate my problem and my expectation.

If anyone know how to solve this problem. So please, help me or just hint me.

Thank you for your patient and sorry for my bad english skill.
Methasit

---------------- Edit #1 ----------------
Here is my “twist_controller” parameters (i use default parameters)

twist_controller:
 type: cartesian_ros_controllers/TwistController
 frame_id: tool0_controller
 publish_rate: *loop_hz
 joints: *robot_joints

#ros