ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You can use UR's python interface, like this:

// Compose a string that contains URScript velocity command
  sprintf(cmd_, "speedl([%1.5f, %1.5f, %1.5f, %1.5f, %1.5f, %1.5f], 0.2, 0.1)\n", delta.getX(), delta.getY(), delta.getZ(), 0., 0., 0.);
  //ROS_INFO_STREAM(cmd_);

  // Copy command string to ROS message string
  urscriptString_.data = cmd_;

  // Send the compliant motion command to the UR5

velPub_.publish(urscriptString_);

You can use UR's python interface, like this:this (bypassing ros_control). The downside is, there won't be any collision checking. We used a 50Hz loop rate.

 // Compose a string that contains URScript velocity command
   sprintf(cmd_, "speedl([%1.5f, %1.5f, %1.5f, %1.5f, %1.5f, %1.5f], 0.2, 0.1)\n", delta.getX(), delta.getY(), delta.getZ(), 0., 0., 0.);
  //ROS_INFO_STREAM(cmd_);
    ROS_INFO_STREAM(cmd_);
    // Copy command string to ROS message string
   urscriptString_.data = cmd_;

   // Send the compliant motion command to the UR5
      velPub_.publish(urscriptString_);

velPub_.publish(urscriptString_);Our lab has also used the Jacobian method like you were trying to do, but only on a Motoman arm (never tried it with a UR).

Update: a new package that handles Jacobian jogging, especially for UR robots: jog_arm

You can use UR's python interface, like this (bypassing ros_control). The downside is, there won't be any collision checking. We used a 50Hz loop rate.

        // Compose a string that contains URScript velocity command
      sprintf(cmd_, "speedl([%1.5f, %1.5f, %1.5f, %1.5f, %1.5f, %1.5f], 0.2, 0.1)\n", delta.getX(), delta.getY(), delta.getZ(), 0., 0., 0.);
      ROS_INFO_STREAM(cmd_);

      // Copy command string to ROS message string
      urscriptString_.data = cmd_;

      // Send the compliant motion command to the UR5
      velPub_.publish(urscriptString_);

Our lab has also used the Jacobian method like you were trying to do, but only on a Motoman arm (never tried it with a UR).

Update: a new package that handles Jacobian jogging, especially for UR robots: jogging: jog_arm

You can use UR's python interface, like this (bypassing ros_control). The downside is, there won't be any collision checking. We used a 50Hz loop rate.

        // Compose a string that contains URScript velocity command
      sprintf(cmd_, "speedl([%1.5f, %1.5f, %1.5f, %1.5f, %1.5f, %1.5f], 0.2, 0.1)\n", delta.getX(), delta.getY(), delta.getZ(), 0., 0., 0.);
      ROS_INFO_STREAM(cmd_);

      // Copy command string to ROS message string
      urscriptString_.data = cmd_;

      // Send the compliant motion command to the UR5
      velPub_.publish(urscriptString_);

Our lab has also used the Jacobian method like you were trying to do, but only on a Motoman arm (never tried it with a UR).