Git Product home page Git Product logo

Comments (8)

fmauch avatar fmauch commented on August 16, 2024

Why would you come to the assumption, that control commands are only sent with 50 Hz?

from universal_robots_externalcontrol_urcap.

nitish3693 avatar nitish3693 commented on August 16, 2024

I am using a custom IK solution to generate trajectory commands like these:

---
header: 
  seq: 191
  stamp: 
    secs: 1639835958
    nsecs: 765319108
  frame_id: ''
goal_id: 
  stamp: 
    secs: 1639835958
    nsecs: 765327930
  id: "/move_group-4-1639835958.765319108"
goal: 
  trajectory: 
    header: 
      seq: 0
      stamp: 
        secs: 0
        nsecs:         0
      frame_id: "world"
    joint_names: [shoulder_pan_joint, shoulder_lift_joint, elbow_joint, wrist_1_joint, wrist_2_joint,
  wrist_3_joint]
    points: 
      - 
        positions: [7.374982670751816e-05, -1.3939911525172393, 1.4019192847185409, -0.005670634384257868, 0.35640352556791954, 0.0031893071445614055]
        velocities: [7.006015059003896e-07, 1.975990426839047e-06, -8.795930761529291e-07, -1.360765239637879e-07, 6.620829717807197e-08, -6.75472778405295e-08]
        accelerations: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
        effort: []
        time_from_start: 
          secs: 0
          nsecs:  20000000
  path_tolerance: []
  goal_tolerance: []
  goal_time_tolerance: 
    secs: 0
    nsecs:         0
---

These commands are then published to the ROS topic /scaled_pos_joint_traj_controller/follow_joint_trajectory/goal using a custom publisher publishing at 50Hz

from universal_robots_externalcontrol_urcap.

nitish3693 avatar nitish3693 commented on August 16, 2024

We are using the driver file ur5e_bringup.launch from the repository for establishing the connection to the URCap externalcontrol-1.0.5.urcap.

The Figure 1 below shows the update of /scaled_pos_joint_traj_controller/follow_joint_trajectory/goal.goal.trajectory.points[0].positions[4] and /scaled_pos_joint_traj_controller/follow_joint_trajectory/goal.goal.trajectory.points[0].velocities[4] from the trajectory command generated using our custom IK scripts to node /ur_hardware_interface

image

image
Figure 1 : Joint 4 Position and Velocity Graph

from universal_robots_externalcontrol_urcap.

nitish3693 avatar nitish3693 commented on August 16, 2024

This is the result from the UR Log Viewer. This there a way to make the Velocity, acceleration and currents smoother. The Joint Position as shown in the result is smooth.

image

from universal_robots_externalcontrol_urcap.

nitish3693 avatar nitish3693 commented on August 16, 2024

Velocity and Position command for the Joint 0 sent from our package to /ur_hardware_interface for a sine wave motion recorded using rosbag :
image

from universal_robots_externalcontrol_urcap.

Changliu52 avatar Changliu52 commented on August 16, 2024

@fmauch
It looks there is obvious added velocity noise from the 'ur_hardware_interface', when it outputs to the robot.
Despite the command input to the 'ur_hardware_interface' was smooth.

Also adjusting the value in the PID gains or velocity_ff in https://github.com/UniversalRobots/Universal_Robots_ROS_Driver/blob/master/ur_robot_driver/config/ur5e_controllers.yaml made no observable difference in performance.

from universal_robots_externalcontrol_urcap.

fmauch avatar fmauch commented on August 16, 2024

You are using the scaled trajectory controller to interface the robot. This controller is generating trajectories based on the input given. In the example above, a trajectory with one setpoint is given. The Setpoint should be reached in 20 ms. The controller now creates a trajectory from the current configuration to the target configuration using a spline interpolation (This is basically, how the joint trajectory controller works). This generated motion is then sampled by the hardware interface (through the controller implementation) in each control cycle (with 500Hz) to generate commands sent to the robot.

Thus, the robot is not "simply going there".

The "noise" mentioned in #26 (comment) comes from the fact, that a servoj command is used to execute the commands. The actual behavior of this servoj command can be altered by changing the values for servoj_gain and servoj_lookahead_time.

For real smooth velocities, a velocity-based controller such as the scaled_vel_joint_traj_controller could be used. Please see the controller documentation for details on the available controllers.

from universal_robots_externalcontrol_urcap.

Changliu52 avatar Changliu52 commented on August 16, 2024

Thank you for the information. @fmauch
We have tested that reducing the servoj_gain reduces the jitters significantly. It seems putting it to 100 (minimal) instead of 2000 (default also maximum) gives the best smoothness in simulation.

Hopefully it will not compromise too much on the control precision?

from universal_robots_externalcontrol_urcap.

Related Issues (15)

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.