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

hpoleselo's profile - activity

2022-08-23 00:34:42 -0500 marked best answer Trouble trying to find ActionType for "execute_trajectory" Action Server

Hello, i'm running ROS Kinetic on Ubuntu 16.04 and working with the Panda robot from Franka Emika.

I'm currently trying to send a command to the robot via Python scripting, i.e Action Client.

I can already send commands to the robot (like stopping it) through the command line, like:

$ rostopic pub -1 /execute_trajectory/cancel actionlib_msgs/GoalID "stamp:
  secs: 0
  nsecs: 0
id: ''"

And i would like to do the same but with Python, so i tried the following:

import actionlib
import rospy
from actionlib_msgs.msg import GoalID
from franka_control.msg import ErrorRecoveryAction, ErrorRecoveryActionGoal


def stop_robot():
    rospy.init_node('panda_STOPP')
    client = actionlib.SimpleActionClient('execute_trajectory', GoalID)
    client.wait_for_server()
    goal = GoalID()
    goal.goal_id.stamp.secs = 0
    goal.goal_id.stamp.nsecs = 0
    goal.goal_id.id = ''
    goal.goal = {}
    client.send_goal(goal)

if name == '__main__':
    stop_robot()

It doesn't work because GoalID is not an action type message. And in order to create the Client we need one Action message. And i find it strange that there is no action message for GoalID because "execute_trajectory" is actually an action server, meaning there should be an action message for it, right? I don't know if understood the concept of Actions wrongly but any help would be welcome!

Thanks!

2022-05-11 11:50:44 -0500 received badge  Good Question (source)
2022-02-19 13:15:34 -0500 received badge  Nice Question (source)
2022-02-19 13:15:25 -0500 received badge  Good Answer (source)
2021-05-03 08:39:28 -0500 received badge  Nice Question (source)
2020-11-10 17:17:47 -0500 received badge  Student (source)
2019-12-16 14:57:26 -0500 answered a question unnormalized quaternions, malformed top_plate.stl and "No map received" when running RVIZ for Clearpath Husky after upgrading to Kinetic

Hello, regarding the error with the STL file: I was facing the same problem and all I did was to download top_plate.stl

2019-11-19 11:42:45 -0500 received badge  Nice Answer (source)
2019-10-12 01:27:58 -0500 marked best answer Problem while Launching MoveIt! library loading error

Hello. I'm using ROS Kinetic. For some reason there is a problem loading a library from OpenCV, as shown below:

[ERROR] [1544178952.950336396]: PluginlibFactory: The plugin for class 'moveit_rviz_plugin/MotionPlanning' failed to load.  Error: Failed to load library /opt/ros/kinetic/lib/libmoveit_motion_planning_rviz_plugin.so. Make sure that you are calling the PLUGINLIB_EXPORT_CLASS macro in the library code, and that names are consistent between this macro and your XML. Error string: Could not load library (Poco exception = /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_imgproc3.so.3.3: undefined symbol: icv_y8_owns_rFFT_1_scale_32f)

I already tried to reinstall the Moveit! Package, opencv3 for ROS and rebuilding my local workspace but nothing seems to work, still getting the same results.

2019-08-02 05:39:07 -0500 received badge  Self-Learner (source)
2019-08-01 17:02:06 -0500 received badge  Famous Question (source)
2019-07-15 11:27:58 -0500 received badge  Famous Question (source)
2019-04-03 04:37:01 -0500 received badge  Notable Question (source)
2019-03-13 09:25:55 -0500 received badge  Famous Question (source)
2019-03-12 15:09:37 -0500 received badge  Popular Question (source)
2019-03-05 05:41:12 -0500 received badge  Famous Question (source)
2019-02-24 10:39:06 -0500 received badge  Famous Question (source)
2019-02-21 08:07:48 -0500 asked a question Action client not preempting action

Action client not preempting action Hello, i think I'm aware how to preempt an action, which is by using the method canc

2019-02-07 06:25:01 -0500 received badge  Notable Question (source)
2019-02-07 04:20:29 -0500 edited answer Didn't received robot state (joint angles) with recent timestamp within 1 seconds. Check clock synchronization if your are running ROS across multiple machines!

I found the error, for some reason there was a remapping on '/opt/ros/kinetic/share/panda_moveit_config/launch/move_grou

2019-02-07 03:53:49 -0500 edited answer How to retrieve absolute pose in ROS

Hey, thanks! I managed to fix it. Actually the timestamps were correct, my tf_tree wasn't completely right, that was it.

2019-02-07 03:53:08 -0500 edited answer How to retrieve absolute pose in ROS

Hey, thanks! I managed to fix it. Actually the timestamps were correct, my tf_tree wasn't completely right, that was it.

2019-02-07 03:51:42 -0500 marked best answer How to retrieve absolute pose in ROS

Hello,

i'm currently doing the detection of ArUco and Alvar fiducial markers (glued on a cube), by that trying to grasp the cube with the detection of the marker. The camera is mounted on the Panda from Franka Emika, which is controlled by ROS with the aid of ROS MoveIt! (I'm sending some joint_values to the robot so we can kind of scan the table where he is on). There's a link to a video where one can see what i'm really doing.

Link: https://youtu.be/oiPJZO2T00k

Technical part: I want to retrieve the absolute pose of the marker, i.e the transform from my first frame, in this case /world to ar_marker_3 and then send this to the robot as his goal. But for some reason (as seen in the video) every time the robot moves in the XY direction of the table, the frame of the marker varies as well, meaning the pose of the marker is actually not absolute (i presume). So my question is: is this correct? Or the way i'm thinking is wrong? I thought that the pose of the marker relative to the world SHOULD be always fixed since the marker is not moving.

I think this question maybe not specific to ROS but robotics in general, but i'm quite in a dead end so any helpful would be nice! Thanks! Pictures of the tf_tree if it helps..

C:\fakepath\tftree1.png C:\fakepath\tftree2.png

2019-02-07 03:51:00 -0500 answered a question How to retrieve absolute pose in ROS

Hey, thanks! I managed to fix it. Actually the timestamps were correct, my tf_tree wasn't completely right, that was it.

2019-02-07 03:05:51 -0500 received badge  Popular Question (source)
2019-02-06 16:36:14 -0500 edited question How to retrieve absolute pose in ROS

How to retrieve absolute pose in ROS Hello, i'm currently doing the detection of ArUco and Alvar fiducial markers (glue

2019-02-06 16:31:56 -0500 asked a question How to retrieve absolute pose in ROS

How to retrieve absolute pose in ROS Hello, i'm currently doing the detection of ArUco and Alvar fiducial markers (glue

2019-01-31 04:49:36 -0500 received badge  Notable Question (source)
2019-01-31 03:51:55 -0500 received badge  Teacher (source)
2019-01-31 03:51:55 -0500 received badge  Self-Learner (source)
2019-01-31 02:40:59 -0500 marked best answer Aruco Detection: operating the inverse of the Pose results in strange value for Translation

Hello,

i'm currently detecting the ArUco Marker with the help of the ros_aruco package. The detection works perfectly, i assume. by doing: $ rostopic echo /aruco_single/pose we obtain

header: 
  seq: 14
  stamp: 
    secs: 1548768525
    nsecs:  49234896
  frame_id: "camera"
pose: 
  position: 
    x: -0.0381913892925
    y: -0.0619406141341
    z: 0.542845368385
  orientation: 
    x: -0.550447938313
    y: 0.445001542715
    z: -0.464275720555
    w: 0.532380267752

By looking to the Z-Axis we can confirm that it's reading correctly, and the x and y as well (the marker is almost on the center of the camera). But this is the result of the transformation marker -> camera. What i really want is the transformation camera -> marker. Meaning we would had to do the inverse of this.

The way i do it: Inverse of a Pose is given by: the inverse of a homogeneous transformation. Which eventually is just operating:

  1. Inverse of the rotation = R.T; where T is the transpose and R the Rotation Matrix
  2. Inverse of the position = -Rt * t; where Rt is the transpose of the Rotation matrix and t is the translation vector

What i get:

Tvec Inverted:
[[-0.43304875]
 [ 0.33646972]
 [-0.02163316]]

Which doesn't make sense because Z should maintain to be around 0.54. Does anybody know why the result is looking so strange? Here is the snippet of the code:

def invert_pose(self, ps):
        # Storing the received pose
        x = ps.pose.position.x
        y = ps.pose.position.y
        z = ps.pose.position.z
        xyz = x, y, z
        tvec = np.array(xyz)
        print ("Tvec: ")
        print tvec

        rx = ps.pose.orientation.x
        ry = ps.pose.orientation.y
        rz = ps.pose.orientation.z
        rw = ps.pose.orientation.w
        quaternion = [rx, ry, rz, rw]
        eule_ang = euler_from_quaternion(quaternion)
        rvec = np.array(eule_ang)
        R = np.matrix(cv2.Rodrigues(rvec)[0])
        Rt = R.T
        invR = self.rotation_matrix_to_euler_angles(Rt)
        invT = -Rt.dot(np.matrix(tvec).T)


        print "Tvec Inverted: "
        print invT
        self.publish_ros(invR, invT)
2019-01-31 02:37:16 -0500 edited question Aruco Detection: operating the inverse of the Pose results in strange value for Translation

Aruco Detection: operating the inverse of the Pose results in strange value for Translation Hello, i'm currently detect

2019-01-31 02:36:46 -0500 edited question Aruco Detection: operating the inverse of the Pose results in strange value for Translation

Aruco Detection: operating the inverse of the Pose results in strange value for Translation Hello, i'm currently detect

2019-01-31 02:36:19 -0500 edited question Aruco Detection: operating the inverse of the Pose results in strange value for Translation

Aruco Detection: operating the inverse of the Pose results in strange value for Translation Hello, i'm currently detect

2019-01-31 02:35:58 -0500 answered a question Aruco Detection: operating the inverse of the Pose results in strange value for Translation

As @gvdhoorn and @PeteBlackerThe3rd answered on the comments, there was a built in function from /tf which is called inv

2019-01-30 10:56:50 -0500 commented question Aruco Detection: operating the inverse of the Pose results in strange value for Translation

ROS never fails to surprise me, very nice! Thank you both for the help! About the lookUp(): exactly like Pete said!

2019-01-30 10:35:20 -0500 received badge  Popular Question (source)
2019-01-30 08:27:56 -0500 commented question Aruco Detection: operating the inverse of the Pose results in strange value for Translation

-> then ROS identified automatically that in order to the relation marker->camera to be valid, it should be inver

2019-01-30 08:26:03 -0500 commented question Aruco Detection: operating the inverse of the Pose results in strange value for Translation

Hi, thank you both for the quick response. I actually didn't know about this function from /tf package. Conclusion: I th

2019-01-29 07:57:59 -0500 asked a question Aruco Detection: operating the inverse of the Pose results in strange value for Translation

Aruco Detection: operating the inverse of the Pose results in strange value for Translation Hello, i'm currently detect

2019-01-17 10:49:05 -0500 received badge  Notable Question (source)
2019-01-07 02:36:04 -0500 received badge  Notable Question (source)
2018-12-12 07:48:33 -0500 received badge  Popular Question (source)
2018-12-12 06:23:52 -0500 answered a question Problem while Launching MoveIt! library loading error

Managed to fix it by trial and error. I suppose some OpenCV3 .so files from ROS were somehow conflicting with the OpenCV

2018-12-07 04:53:18 -0500 edited question Problem while Launching MoveIt! library loading error

Problem while Launching MoveIt! library loading error Hello. I'm using ROS Kinetic. For some reason there is a problem l