Ask Your Question
0

How to use Universal Robot UR5 with tesseract (TrajOpt)

asked 2019-05-08 09:06:26 -0500

DieterWuytens gravatar image

Currently working with STOMP and a universal robot UR5. (Kinetic)

First of all i use the UR5-package from github. Everything working fine. Next commands are used to start the robot connection, launch the planner STOMP and RVIZ simulation.

roslaunch ur_bringup ur5_bringup.launch robot_ip:=192.168.0.1 
roslaunch ur5_moveit_config ur5_moveit_planning_execution.launch 
roslaunch ur5_moveit_config moveit_rviz.launch config:=true

Next i run a small python file: rosrun ur5_moveit_chomp_config trajectory.py

This python file works perfectly in the simulation and goes from A to B. Next the trajectory is send to executing it and the real robot also moves from A to B. Everything is working fine. The topic with the trajectory is:

/move_group/monitored_planning_scene

I guess the driver listens to that topic... I also wrote a cpp-file for the same problem with the TrajOpt planner. Also working with RVIZ using tesseract-package.

But how do i send this trajectory to the real UR5 ? Tesseract topic is:

trajopt/display_tesseract_trajectory

How can i implement the tesseract trajectory with the UR5? Can i remap the topics?

Thanks in advance.

edit retag flag offensive close merge delete

Comments

Sort of the same issue here: https://github.com/ros-industrial-con...

ChristophBrasseur gravatar image ChristophBrasseur  ( 2019-05-08 09:19:09 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-05-08 09:19:48 -0500

gvdhoorn gravatar image

The topic with the trajectory is:

/move_group/monitored_planning_scene

I guess the driver listens to that topic..

No, that is not how things are connected.

The driver exposes a FollowJointTrajectory action server and MoveIt is a client of that server.

The topic you mention is involved in synchronisation of the planning scene, which is a MoveIt internal datastructure. It's got nothing to with execution of trajectories.

edit flag offensive delete link more

Comments

How can i send the trajopt/display_tesseract_trajectory to the driver of the UR5?

DieterWuytens gravatar image DieterWuytens  ( 2019-05-08 09:30:28 -0500 )edit

Not. Or at least, not without transforming the data types.


Edit: the issues that @ChristophBrasseur links to in his comment points to this code for converting a Tesseract result into a FollowJointTrajectory goal and then submitting that.

That would be roughly how you could do what you want.

gvdhoorn gravatar image gvdhoorn  ( 2019-05-08 09:31:38 -0500 )edit

I understand the code that is used in your link. But i have programmed it like this.

Please explain to me how to integrate the planning response etc? i don't use that in my code .. ? I used the cartesian path example from trajopt_ros moveit package.

DieterWuytens gravatar image DieterWuytens  ( 2019-05-09 04:40:25 -0500 )edit

I'm afraid I don't have time right now to go through 350+ lines of code and Tesseract/TrajOpt to come up with a suitable conversion implementation.

In general you'll want to take whatever TrajOpt gives you, convert that (somehow) into a FollowJointTrajectory action goal and then submit that goal, using an action client, to your robot driver.

That would be the way to execute your planning results on the real robot (and not just a UR5 actually, any robot driver that exposes a FollowJointTrajectory action server).

gvdhoorn gravatar image gvdhoorn  ( 2019-05-09 05:03:40 -0500 )edit

Thanks for the command. I tried implementing it with traj_msg = trajArrayToJointTrajectoryMsg(joint_names, traj_array, false, t);

and a bunch of other code as you referred to. Seems to work until my ur_driver says: "Received a goal without velocities". Any suggestions for that? My traj_array does only include positions as far as i know off.

DieterWuytens gravatar image DieterWuytens  ( 2019-05-09 08:26:33 -0500 )edit

You'll have to make sure the JointTrajectory contains valid positions, timestamps and velocities. Otherwise the driver cannot execute it.

You may be able to use the Iterative Parabolic Time Parameterization that MoveIt comes with (or one of the alternative algorithms).

gvdhoorn gravatar image gvdhoorn  ( 2019-05-09 08:29:41 -0500 )edit

Timestamps can be added to the traj_array by using: pci.basic_info.use_time = true; The traj_array has one extra column now. First 6 columns (6dof-robot) now 7 colomns with the timestamps. But still the error of "received goal without velocities". Is there a tutorial of how to use the Iterative Parabolic Time Parameterization?

DieterWuytens gravatar image DieterWuytens  ( 2019-05-09 09:23:18 -0500 )edit

Issue was made on GitHub.

DieterWuytens gravatar image DieterWuytens  ( 2019-05-15 02:19:03 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-05-08 09:06:26 -0500

Seen: 440 times

Last updated: May 08 '19