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

horvath.daniel's profile - activity

2022-07-13 08:58:59 -0500 received badge  Famous Question (source)
2022-04-20 06:59:46 -0500 received badge  Famous Question (source)
2022-04-18 15:07:39 -0500 received badge  Famous Question (source)
2022-04-18 15:07:39 -0500 received badge  Notable Question (source)
2022-04-18 15:07:39 -0500 received badge  Popular Question (source)
2022-02-15 09:23:29 -0500 received badge  Popular Question (source)
2022-01-21 10:45:10 -0500 received badge  Famous Question (source)
2022-01-21 10:45:10 -0500 received badge  Notable Question (source)
2021-10-20 07:05:16 -0500 received badge  Notable Question (source)
2021-09-28 06:23:23 -0500 edited question Universal Robot force feedback

Universal Robot force feedback Hello! I'm working on a project which involves the use of an UR5e robot arm. This arm h

2021-09-28 06:21:16 -0500 asked a question Universal Robot force feedback

Universal Robot force feedback Hello! I'm working on a project which involves the use of an UR5e robot arm. This arm h

2021-09-24 06:09:14 -0500 marked best answer Error publishing data to topic

Hello! I was working on a small python program to control a robot arm in Gazebo. My goal with this small program is to make the arm do an oscillating motion and I use /joint_group_pos_controller/command to publish the joint states.

This is the code:

#!/usr/bin/env python
# license removed for brevity
import rospy
from std_msgs.msg import String
from std_msgs.msg import Float64MultiArray
#from trajectory_msgs import JointTrajectory

def talker():
    pub = rospy.Publisher('/joint_group_pos_controller/command', Float64MultiArray, queue_size=10)
    rospy.init_node('arm_move_control', anonymous=True)
    rate = rospy.Rate(10) # 10hz

    while not rospy.is_shutdown():
        hello_str = "hello world %s" % rospy.get_time()
        rospy.loginfo(hello_str)
        data = [0.0, -2.0, 0.0, -1.57, 0.0, -0.5]
        pub.publish(1,data)
        rospy.sleep(4)
        data = [0.0, -1.57, 0.0, -2.0, 0.0, -1.5]
        pub.publish(1,data)
        rospy.sleep(4)

    if rospy.is_shutdown():
        rospy.loginfo("---- SHUTTING DOWN ----")

if __name__ == '__main__':
    try:
        talker()
    except rospy.ROSInterruptException:
        pass

So when I run the code I get this error:

[INFO] [1631362769.809577, 0.000000]: hello world 0.0
Traceback (most recent call last):
  File "/home/hdani-ros/catkin_ws/src/ur_keyboard_teleop/scripts/ur_keyboard_teleop.py", line 28, in <module>
    talker()
  File "/home/hdani-ros/catkin_ws/src/ur_keyboard_teleop/scripts/ur_keyboard_teleop.py", line 17, in talker
    pub.publish(data)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/topics.py", line 879, in publish
    data = args_kwds_to_message(self.data_class, args, kwds)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/msg.py", line 122, in args_kwds_to_message
    return data_class(*args)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/std_msgs/msg/_Float64MultiArray.py", line 74, in __init__
    super(Float64MultiArray, self).__init__(*args, **kwds)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/genpy/message.py", line 344, in __init__
    raise TypeError('Invalid number of arguments, args should be %s' % str(self.__slots__) + ' args are' + str(args))
TypeError: Invalid number of arguments, args should be ['layout', 'data'] args are([0.0, -2.0, 0.0, -1.57, 0.0, -0.5],)

Can someone clarify as to what I need to change in order to send just the joint states? Thanks in advance!

2021-09-24 06:06:06 -0500 marked best answer Re-scaling output values of a topic

Hello guys! I'm working on a teleop project with a Spacenav joystick for a UR5e robot arm. I've remapped the topic to which the spacenav_node published originally to /twist_controller/command but the values which the joystick sends are too big for the robot arm to safely use and so the safety is triggered. How do I re-scale the values to more optimal ones? The maximum values which the joystick publishes are ~0.9. How do I scale that range down to -0.04 and 0.04?

I'm thinking of making a separate package which launches in parallel to the spacenav one and which takes the output values and divides them by a constant. Is this a viable solution or is there a simpler method to resolve this issue?

Thanks in advance.

2021-09-24 06:06:02 -0500 received badge  Popular Question (source)
2021-09-23 04:27:40 -0500 asked a question Re-scaling output values of a topic

Re-scaling output values of a topic Hello guys! I'm working on a teleop project with a Spacenav joystick for a UR5e robo

2021-09-23 03:34:00 -0500 commented answer Publishing data from Spacenav node to other topics

Thanks! This solution works perfectly! Although I have an unexpected problem: when connecting to a robot arm, the twist

2021-09-23 03:03:45 -0500 commented answer Publishing data from Spacenav node to other topics

Thanks! This solution works perfectly! Although I have an unexpected problem: when connecting to a robot arm, the twist

2021-09-23 02:59:27 -0500 marked best answer Publishing data from Spacenav node to other topics

Hello! I'm working on a small teleoperation program (currently only for the turtlesim and afterwards for an UR5e robot arm) using a Spacenav 3dconnexion joystick and I'm trying to figure out how to send the Twist data from the Spacenav node which publishes to any other topic (in short, how to make the spacenav node publish to other topics).

Is there a built-in feature which I can use to change the name of the topic where it publishes the twist messages?

Thanks in advance.

2021-09-22 04:05:33 -0500 asked a question Publishing data from Spacenav node to other topics

Publishing data from Spacenav node to other topics Hello! I'm working on a small teleoperation program (currently only f

2021-09-20 03:22:06 -0500 asked a question How to publish twist msg from spacenav joystick

How to publish twist msg from spacenav joystick Hello! I'm working on controlling a UR5e robot arm through teleoperation

2021-09-17 04:04:23 -0500 asked a question Getting keyboard input with Python for teleoperation

Getting keyboard input with Python for teleoperation Hello! I was wondering is there was any way to use rosrun on a pyt

2021-09-15 02:52:57 -0500 received badge  Popular Question (source)
2021-09-12 08:45:03 -0500 commented answer Error publishing data to topic

This is what the message looks like when I publish it from the terminal (which is the method that works): rostopic pub

2021-09-12 04:53:07 -0500 commented answer Error publishing data to topic

Ok, so I changed the code to this: movement_data = Float64MultiArray() jointStates = [0.0, -2.0, 0.0, -1.57, 0.0, -0.5

2021-09-11 09:09:08 -0500 edited question Error publishing data to topic

Error publishing data to topic Hello! I was working on a small python program to control a robot arm in Gazebo. My goal

2021-09-11 09:08:34 -0500 asked a question Error publishing data to topic

Error publishing data to topic Hello! I was working on a small python program to control a robot arm in Gazebo. My goal

2021-09-11 09:01:44 -0500 marked best answer Big difference between simulated robot and real robot (ros_control, position & velocity controllers)

Hello! I've been working with an UR5e robot arm these past few weeks and I've tried to control it using ROS. I'm using the ur_robot_driver to connect to my robot arm. Currently, I'm trying to test out a few movements using the /joint_group_vel_controller/command topic (and yes, I've switched to the said controller using rosservice). The real robot is positioned just like the one in the gazebo from the picture below (only with a few millimeters difference, but basically the same values). image description

As I was connecting to the robot I received this notification:

[ERROR] [1631004560.884070577]: The calibration parameters of the connected robot don't match the ones from the given kinematics config file. Please be aware that this can lead to critical inaccuracies of tcp positions. Use the ur_calibration tool to extract the correct calibration from the robot and pass that into the description. See [https://github.com/UniversalRobots/Universal_Robots_ROS_Driver#extract-calibration-information] for details.

So I ran rostopic echo /joint_states the first time I've connected to the robot to check the position and the values were approximate to the ones in the picture, meaning that it read the position correctly. But once I ran the command with the values I used in gazebo, I was expecting to only get a small amount of movement (as the values are still a bit off from the real position of the robot). Instead, the whole robot arm moved in an completely unexpected position, far from the expected values.

Next, I disconnected from the robot, and used the calibration_correction to create a calibration file (I've pasted the contents of the said file in this pastebin: https://pastebin.com/z4Jv4Gec) and then used that file as the kinematics file when I launched the driver again, but this time when I ran rostopic echo /joint_states I got values that were way different than what they should have been:

---
header: 
  seq: 34396
  stamp: 
    secs: 1631003512
    nsecs: 161211710
  frame_id: ''
name: 
  - elbow_joint
  - shoulder_lift_joint
  - shoulder_pan_joint
  - wrist_1_joint
  - wrist_2_joint
  - wrist_3_joint
position: [-6.643843516940251e-05, -1.5709220371642054, -0.000134770070211232, -1.5709978542723597, 6.315350765362382e-05, -0.00014382997621709137]
velocity: [-0.0, 0.0, 0.0, -0.0, 0.0, 0.0]
effort: [0.13641898334026337, -0.10197316110134125, -0.007954925298690796, -0.039881058037281036, -0.02918042428791523, 0.012054499238729477]
---
header: 
  seq: 34397
  stamp: 
    secs: 1631003512
    nsecs: 163216999
  frame_id: ''
name: 
  - elbow_joint
  - shoulder_lift_joint
  - shoulder_pan_joint
  - wrist_1_joint
  - wrist_2_joint
  - wrist_3_joint
position: [-5.399739893618971e-05, -1.5709430179991664, -8.184114565068512e-05, -1.5709816418089808, 4.259109846316278e-05, -0.000134770070211232]
velocity: [-0.0, 0.0, 0.0, -0.0, 0.0, 0.0]
effort: [0.10822169482707977, -0.1689099222421646, -0.031928807497024536, -0.04185150936245918, -0.04760636389255524, 0.0033494792878627777]
---

Why are the values for the position so off even if I've done the calibration and why do they keep changing so much (some values go from for example -5.6 to 6.4)?

2021-09-11 09:01:06 -0500 marked best answer Problems installing UR driver on ROS kinetic

Hello! I'm having trouble installing the ur_robot_driver. I've followed all the steps for installing ROS kinetic and it installed alright and now that I am trying to install the drivers for UR robots an error appears whenever I try running the "rosdep install --from-paths src --ignore-src --rosdistro kinetic -y":

ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
ur_kinematics: Cannot locate rosdep definition for [moveit_ros_planning]
ur10e_moveit_config: Cannot locate rosdep definition for [moveit_simple_controller_manager]
ur5e_moveit_config: Cannot locate rosdep definition for [moveit_simple_controller_manager]
ur10_moveit_config: Cannot locate rosdep definition for [moveit_simple_controller_manager]
ur_calibration: Cannot locate rosdep definition for [ur_client_library]
ur5_moveit_config: Cannot locate rosdep definition for [moveit_simple_controller_manager]
controller_stopper: Cannot locate rosdep definition for [controller_manager_msgs]
ur_gazebo: Cannot locate rosdep definition for [position_controllers] 
ur_robot_driver: Cannot locate rosdep definition for [ur_msgs]
ur_description: Cannot locate rosdep definition for [joint_state_publisher_gui]
ur3_moveit_config: Cannot locate rosdep definition for [moveit_simple_controller_manager]
ur16e_moveit_config: Cannot locate rosdep definition for [moveit_simple_controller_manager]
ur3e_moveit_config: Cannot locate rosdep definition for [moveit_simple_controller_manager]
ur_controllers: Cannot locate rosdep definition for [realtime_tools]

Does anyone know why I keep getting this error?

2021-09-11 09:00:59 -0500 received badge  Famous Question (source)
2021-09-11 09:00:34 -0500 marked best answer ROS UR5e robot arm teleop

Hey guys! I'm currently working on a small project which mainly consists of controlling a UR5e robot arm's movement using my keyboard. The drivers I'm using are the official drivers from this link: https://github.com/UniversalRobots/Un....

So I have 2 questions: 1) Can I develop a program which controls the simulation of the robot arm in Gazebo and still use that code to control the arm in real life? 2) What drivers or topics would I need to access in order to get and write data to and from the robot's joints?

Thank you.

2021-09-11 09:00:12 -0500 marked best answer Twist_controller speedl function error on robot teachpendant

Hello! I'm currently working on a teleoperation project with an UR robot and I'm trying to use the twist_controller from the ur_robot_driver to control the robot. But I keep running intro an error whenever I try to run a command such as:

danielh@danielh:~/catkin_ws$ rostopic pub /twist_controller/command geometry_msgs/Twist "linear:
  x: 0.0
  y: 0.01
  z: 0.0
angular:
  x: 0.0
  y: 0.0
  z: 0.0"

The error is as such:

The robot cannot reach the requested pose. Script function speedl is unable to find an inverse kinematics solution.

The real robot is in a pose similar to this one:

image description

How is the function speedl related to this problem and what fix is there for this? Thanks in advance!

2021-09-11 09:00:12 -0500 received badge  Scholar (source)
2021-09-10 03:33:43 -0500 commented answer Twist_controller speedl function error on robot teachpendant

Alright, so indeed the problem was with the robot's pose. I moved it into a neutral pose and now it works. Thanks for th

2021-09-09 14:03:58 -0500 edited question Twist_controller speedl function error on robot teachpendant

Twist_controller speedl function error on robot teachpendant Hello! I'm currently working on a teleoperation project wi

2021-09-09 09:38:43 -0500 commented question Twist_controller speedl function error on robot teachpendant

It's in a vertical pose, exactly as the one in the image from this post.

2021-09-09 04:31:31 -0500 commented answer Big difference between simulated robot and real robot (ros_control, position & velocity controllers)

Yes, the twist_controller is already implemented in ur_robot_driver/config in each controller.yaml file so I didn't have

2021-09-09 04:06:01 -0500 edited question Twist_controller speedl function error on robot teachpendant

Twist_controller speedl function error on robot teachpendant Hello! I'm currently working on a teleoperation project wi

2021-09-09 04:04:57 -0500 commented answer Big difference between simulated robot and real robot (ros_control, position & velocity controllers)

Right, I see. Where exactly do I find this ros_control configuration file?

2021-09-09 04:04:44 -0500 commented answer Big difference between simulated robot and real robot (ros_control, position & velocity controllers)

Right, I see. Where exactly do I find this 'ros_control' configuration file?

2021-09-09 04:01:05 -0500 asked a question Twist_controller speedl function error on robot teachpendant

Twist_controller speedl function error on robot teachpendant Hello! I'm currently working on an teleoperation project w

2021-09-09 03:47:48 -0500 commented answer Big difference between simulated robot and real robot (ros_control, position & velocity controllers)

Thanks for the clarification! I understand better now. So I guess that the equivalent to the joint_group_pos_controller

2021-09-08 12:18:28 -0500 received badge  Notable Question (source)
2021-09-08 03:46:08 -0500 received badge  Popular Question (source)
2021-09-08 01:32:38 -0500 edited question Big difference between simulated robot and real robot (ros_control, position & velocity controllers)

UR robot not calibrated correctly? Hello! I've been working with an UR5e robot arm these past few weeks and I've tried t

2021-09-08 01:25:06 -0500 commented question Big difference between simulated robot and real robot (ros_control, position & velocity controllers)

Yes, in the gazebo simulation I did use joint_group_position_controller as it is similar to the joint_group_vel_controll