Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/cartesian motion #2

Open
wants to merge 7 commits into
base: feature/cartesian_motion
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions ur_description/urdf/ur10.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,18 @@
<origin xyz="0.0 0.0 0.0" rpy="0 0 0" />
</xacro:cylinder_inertial>
</link>

<link name="${prefix}ur_base_link"/>
<joint name="${prefix}ur_base_joint" type="fixed">
<parent link="${prefix}base_link" />
<child link = "${prefix}ur_base_link" />
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 -${pi}" />
</joint>

<joint name="${prefix}shoulder_pan_joint" type="revolute">
<parent link="${prefix}base_link" />
<parent link="${prefix}ur_base_link" />
<child link = "${prefix}shoulder_link" />
<origin xyz="0.0 0.0 ${shoulder_height}" rpy="0.0 0.0 0.0" />
<origin xyz="0.0 0.0 ${shoulder_height}" rpy="0.0 0.0 ${pi}" />
<axis xyz="0 0 1" />
<xacro:unless value="${joint_limited}">
<limit lower="${-2.0 * pi}" upper="${2.0 * pi}" effort="330.0" velocity="2.16"/>
Expand Down
2 changes: 1 addition & 1 deletion ur_driver/prog
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ def driverProg():
#goal = [0.495, 0.22998, 0.15264, -0.3717, 0.72, -2.57]
goal = p[params_movel[2] / MULT_jointstate, params_movel[3] / MULT_jointstate, params_movel[4] / MULT_jointstate, params_movel[5] / MULT_jointstate, params_movel[6] / MULT_jointstate, params_movel[7] / MULT_jointstate]
send_out(goal)
movel(goal, a=1.2, v=movel_vel, t=0, r=0)
movel(goal, a=0.8, v=movel_vel, t=0, r=0)
send_out("Finished MOVEL")
send_waypoint_finished(424)
else:
Expand Down
2 changes: 2 additions & 0 deletions ur_driver/src/ur_driver/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,8 @@ def execute_cb(self, goal_handle):
ps.header = copy.deepcopy(goal_handle.header)
ps.header.stamp = rospy.Time(0)
ps.pose = copy.deepcopy(pose)

self.tfl.waitForTransform("/ur_base_link", ps.header.frame_id, ps.header.stamp, rospy.Duration(4.0))
ps_ur_bl = self.tfl.transformPose("ur_base_link", ps)
p_ur_bl = ps_ur_bl.pose
#print p_ur_bl
Expand Down