Ask Your Question

Rik1234's profile - activity

2019-12-17 05:50:00 -0600 received badge  Popular Question (source)
2019-06-23 05:38:22 -0600 received badge  Famous Question (source)
2019-06-20 08:21:11 -0600 received badge  Famous Question (source)
2019-06-20 08:21:11 -0600 received badge  Notable Question (source)
2019-06-19 11:59:45 -0600 asked a question Rotations of the end effector not working properly in UR5 Visual servoing

Rotations of the end effector not working properly in UR5 Visual servoing Hello everyone. As the title suggests, I am ab

2019-06-15 04:19:29 -0600 commented answer UR5+velocity control: runaway robot after getting closer to goal pose

Sure. I'll do that. Thanks for your help.

2019-06-15 04:19:08 -0600 marked best answer UR5+velocity control: runaway robot after getting closer to goal pose

In my algorithm, the robot seemingly moves towards the right position, as the joint velocities reduce, after that the velocities start increasing as the robot moves away. I cannot understand why this is happening and need some urgent help. My github project link is given below: https://github.com/RiddhimanRaut/Ur5_... The object recognition and everything else is working as expected. Also the robot does not stop when I stop the run_ur5.py code, I've checked rostopic echo and joint velocities are still being published. Maybe the two problems are related. Please help.

The codes are all mine.

EDIT 2:

This is a trial velocity publisher I've written just to test the lag issue

#!/usr/bin/env python
import rospy
from ur5_control_nodes.msg import floatList

import rospy
from std_msgs.msg import String

def talker():
    pub = rospy.Publisher('ur5_joint_velocities', floatList, queue_size=10)
    rospy.init_node('talker', anonymous=True)

    while not rospy.is_shutdown():
        vels=[0,0,0.05,0,0,0]

        pub.publish(vels)


if __name__ == '__main__':
    talker()

Code for color detection

#!/usr/bin/env python
import rospy
import numpy as np
import cv2
from sensor_msgs.msg import Image
from ur5_control_nodes.msg import floatList
from cv_bridge import CvBridge, CvBridgeError
import imutils

bridge=CvBridge()
rgb_img=np.zeros((480,640,3),np.uint8)
depth_img=np.zeros((480,640))

#RGB Image Callback
def rgb_callback(rgb_msg):
    global rgb_img   
    rgb_img=bridge.imgmsg_to_cv2(rgb_msg, "bgr8")     


#Depth Image Callback 
def d_callback(msg):

    global depth_img
    depth_img=bridge.imgmsg_to_cv2(msg, desired_encoding="passthrough")




#Getting XY Points
def xy_points(frame):
    fl=531.15

    xypoints=np.array([0,0,0,0,0,0], dtype=np.int64)


    blurred = cv2.GaussianBlur(frame, (11, 11), 0)

    hsv=cv2.cvtColor(blurred, cv2.COLOR_BGR2HSV)

    #defining the Range of Blue color
    blue_lower=np.array([87,100,150],np.uint8)
    blue_upper=np.array([110,255,255],np.uint8)



    blue=cv2.inRange(hsv,blue_lower,blue_upper)
    blue = cv2.erode(blue, None, iterations=2)
    blue = cv2.dilate(blue, None, iterations=2)

    cnts_b = cv2.findContours(blue.copy(), cv2.RETR_EXTERNAL,
        cv2.CHAIN_APPROX_SIMPLE)
    cnts_b = imutils.grab_contours(cnts_b)
    center_b = None
    if len(cnts_b) > 0:
        c_b = max(cnts_b, key=cv2.contourArea)
        # epsilon = 0.1*cv2.arcLength(c,True)
        # approx = cv2.approxPolyDP(c,epsilon,True)
        M_b= cv2.moments(c_b)
        center_b= (int(M_b["m10"] / M_b["m00"]), int(M_b["m01"] / M_b["m00"]))
        cv2.circle(frame, center_b, 5, (255, 255,255), -1)
        xypoints[2]=center_b[0]
        xypoints[3]=center_b[1]
    #Red
    low_r = np.array([140,150,0],np.uint8)
    high_r = np.array([180,255,255],np.uint8)

    red=cv2.inRange(hsv,low_r,high_r)
    red = cv2.erode(red, None, iterations=2)
    red = cv2.dilate(red, None, iterations=2)

    cnts_r = cv2.findContours(red.copy(), cv2.RETR_EXTERNAL,
        cv2.CHAIN_APPROX_SIMPLE)
    cnts_r = imutils.grab_contours(cnts_r)
    center_r = None
    if len(cnts_r) > 0:
        c_r = max(cnts_r, key=cv2.contourArea)
        # epsilon = 0.1*cv2.arcLength(c,True)
        # approx = cv2.approxPolyDP(c,epsilon,True)
        M_r= cv2.moments(c_r)
        center_r= (int(M_r["m10"] / M_r["m00"]), int(M_r["m01"] / M_r["m00"]))
        cv2.circle(frame, center_r, 5, (255, 255,255), -1)
        xypoints[4]=center_r[0]
        xypoints[5]=center_r[1]

    #Green
    low_g = np ...
(more)
2019-06-15 04:19:08 -0600 received badge  Scholar (source)
2019-06-15 04:18:16 -0600 commented answer UR5+velocity control: runaway robot after getting closer to goal pose

Sure. I'll do that.

2019-06-13 23:38:38 -0600 commented question UR5+velocity control: runaway robot after getting closer to goal pose

I did try that. the joint velocities as well as the end effector velocities are different in both the controllers. I ask

2019-06-13 23:38:38 -0600 received badge  Commentator
2019-06-13 23:32:56 -0600 received badge  Enthusiast
2019-06-13 11:20:32 -0600 received badge  Popular Question (source)
2019-06-12 23:57:49 -0600 asked a question Jacobian behaviour differs in two controllers

Jacobian behaviour differs in two controllers I'm trying to implement visual servoing on a UR5 using a hand held kinect

2019-06-12 23:51:12 -0600 commented question UR5+velocity control: runaway robot after getting closer to goal pose

Maybe this will be a separate question. I'll ask in a new thread.

2019-06-11 15:22:18 -0600 commented question UR5+velocity control: runaway robot after getting closer to goal pose

Yes, that was it. Now there is no lag between the robot. However, solving one problem leads to another, and for some rea

2019-06-11 15:07:50 -0600 received badge  Notable Question (source)
2019-06-11 07:31:45 -0600 commented question UR5+velocity control: runaway robot after getting closer to goal pose

okay so I have written a very basic publisher, giving a velocity to the third joint(elbow). The run_ur5.py has also been

2019-06-11 07:29:06 -0600 edited question UR5+velocity control: runaway robot after getting closer to goal pose

UR5+velocity control: runaway robot after getting closer to goal pose In my algorithm, the robot seemingly moves towards

2019-06-11 05:56:23 -0600 commented question UR5+velocity control: runaway robot after getting closer to goal pose

I tried, and the controller is working, but the lag is really large! I exited the run_ur5.py code but the robot would ke

2019-06-11 05:54:58 -0600 commented question UR5+velocity control: runaway robot after getting closer to goal pose

I tried, and the controller is working, but the lag is really large! I exited the run_ur5.py code but the robot would ke

2019-06-11 05:02:12 -0600 commented question UR5+velocity control: runaway robot after getting closer to goal pose

Just an update, i got that controller working just before you replied, the robot is moving, but the lag is still there.

2019-06-11 03:39:19 -0600 received badge  Popular Question (source)
2019-06-11 03:38:38 -0600 edited question UR5+velocity control: runaway robot after getting closer to goal pose

UR5+velocity control: runaway robot after getting closer to goal pose In my algorithm, the robot seemingly moves towards

2019-06-11 03:38:38 -0600 received badge  Editor (source)
2019-06-11 03:38:16 -0600 commented question UR5+velocity control: runaway robot after getting closer to goal pose

okay so the launch shell code goes something like this roslaunch ur_modern_driver ur5_bringup.launch robot_ip:=(robot_

2019-06-10 13:06:12 -0600 commented question UR5+velocity control: runaway robot after getting closer to goal pose

Okay, I cannot figure out how to implement ros_control to replace my ur_modern_driver package. Can you help or guide me

2019-06-10 07:31:22 -0600 commented question UR5+velocity control: runaway robot after getting closer to goal pose

Thanks for your reply! I thought the infinite loop for callbacks could be used for publishing as well. I will rectify

2019-06-10 07:30:59 -0600 commented question UR5+velocity control: runaway robot after getting closer to goal pose

Thanks for your reply! I thought the infinite loop for callbacks could be used for publishing as well. I will rectify

2019-06-10 07:24:03 -0600 commented question UR5+velocity control: runaway robot after getting closer to goal pose

Thanks for your reply! 1) I thought the infinite loop for callbacks could be used for publishing as well. I will rectif

2019-06-10 03:59:43 -0600 commented question UR5+velocity control: runaway robot after getting closer to goal pose

Thank you for your reply, I've updated the question to include all my codes.

2019-06-10 03:59:09 -0600 edited question UR5+velocity control: runaway robot after getting closer to goal pose

UR5+velocity control: runaway robot after getting closer to goal pose In my algorithm, the robot seemingly moves towards

2019-06-10 00:33:44 -0600 asked a question Visual Servoing on a UR5

Visual Servoing on a UR5 In my algorithm, the robot seemingly moves towards the right position, as the joint velocities

2019-06-10 00:33:40 -0600 asked a question UR5+velocity control: runaway robot after getting closer to goal pose

Visual Servoing on a UR5 In my algorithm, the robot seemingly moves towards the right position, as the joint velocities

2019-05-03 18:34:36 -0600 received badge  Famous Question (source)
2018-10-16 17:12:58 -0600 received badge  Notable Question (source)
2018-07-21 08:54:47 -0600 received badge  Popular Question (source)
2018-06-25 10:28:17 -0600 asked a question Unable to move robot using 2d nav goal

Unable to move robot using 2d nav goal I will list all my steps clearly, including my git repo. If anyone needs anything