Skip to content
This repository has been archived by the owner on Dec 13, 2024. It is now read-only.

Commit

Permalink
Add wood texture and blocks to mock sim (#24)
Browse files Browse the repository at this point in the history
* Replace blue block with wood block

* Fix link and gazebo xacro

* Add cubes and waypoints
  • Loading branch information
Abishalini authored May 31, 2023
1 parent beccab0 commit 05aef75
Show file tree
Hide file tree
Showing 4 changed files with 108 additions and 11 deletions.
86 changes: 80 additions & 6 deletions src/picknik_ur_base_config/description/picknik_ur5e.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@

<!-- Import environment macros -->
<xacro:include filename="$(find picknik_accessories)/descriptions/geometry/collision_and_visual/cube_collision_and_visual.urdf.xacro" />
<xacro:include filename="$(find picknik_accessories)/descriptions/geometry/visual/cube_visual.urdf.xacro" />

<link name="world" />
<!-- arm -->
Expand Down Expand Up @@ -100,16 +101,89 @@

<!-- Environment -->
<link name="environment">
<!-- Table -->
<xacro:cube_collision_and_visual length="2.0" width="2.0" height="0.25" alpha="0.3">
<origin xyz="0 0 ${-0.25/2}" rpy="0 0 0" />
</xacro:cube_collision_and_visual>
<visual>
<origin xyz="0 0 0" rpy="0 0 0" />
<geometry>
<mesh filename="package://picknik_accessories/descriptions/furniture/generic_table/wood_block.dae" scale="0.5 0.5 0.1"/>
</geometry>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="package://picknik_accessories/descriptions/furniture/generic_table/wood_block.dae" scale="0.5 0.5 0.1"/>
</geometry>
</collision>
</link>

<joint name="base_to_environment" type="fixed">
<joint name="table_joint" type="fixed">
<parent link="base" />
<child link="environment" />
<origin rpy="0 0 0" xyz="0 0 0" />
<origin rpy="0 0 0" xyz="0 0 -0.05" />
</joint>

<link name="box_1">
<xacro:cube_visual length="0.05" width="0.05" height="0.05">
<origin xyz="0 0 0" rpy="0 0 0" />
<color rgba="0.1 0.1 0.1 0.9" />
</xacro:cube_visual>
</link>

<joint name="box1_on_table" type="fixed">
<parent link="environment" />
<child link="box_1" />
<origin rpy="0 0 0" xyz="0.65 -0.35 0.1" />
</joint>

<link name="box_2">
<xacro:cube_visual length="0.05" width="0.05" height="0.05">
<origin xyz="0 0 0" rpy="0 0 0" />
<color rgba="0.5 0.5 0.5 0.9" />
</xacro:cube_visual>
</link>

<joint name="box2_on_table" type="fixed">
<parent link="environment" />
<child link="box_2" />
<origin rpy="0 0 0" xyz="0.65 0.35 0.1" />
</joint>

<link name="box_3">
<xacro:cube_visual length="0.05" width="0.05" height="0.05">
<origin xyz="0 0 0" rpy="0 0 0" />
<color rgba="0.8 0.3 0.1 0.9" />
</xacro:cube_visual>
</link>

<joint name="box3_on_table" type="fixed">
<parent link="environment" />
<child link="box_3" />
<origin rpy="0 0 0" xyz="0.65 0 0.1" />
</joint>

<link name="box_4">
<xacro:cube_visual length="0.05" width="0.05" height="0.05">
<origin xyz="0 0 0" rpy="0 0 0" />
<color rgba="0.8 0.3 0.1 0.9" />
</xacro:cube_visual>
</link>

<joint name="box4_on_table" type="fixed">
<parent link="environment" />
<child link="box_4" />
<origin rpy="0 0 0" xyz="-0.65 0.25 0.1" />
</joint>

<link name="box_5">
<xacro:cube_visual length="0.05" width="0.05" height="0.05">
<origin xyz="0 0 0" rpy="0 0 0" />
<color rgba="0.1 0.3 0.8 0.9" />
</xacro:cube_visual>
</link>

<joint name="box5_on_table" type="fixed">
<parent link="environment" />
<child link="box_5" />
<origin rpy="0 0 0" xyz="-0.65 -0.25 0.1" />
</joint>

<!-- External Camera -->
Expand Down
22 changes: 22 additions & 0 deletions src/picknik_ur_base_config/waypoints/ur5e_waypoints.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -170,3 +170,25 @@
position: [-0.51890546480287725, -1.6439539394774378, -0.50593507289886475, -2.1812287769713343, 1.8930472135543823, -0.48202354112734014]
velocity: []
effort: []
- name: Place Block
joint_state:
header:
frame_id: world
stamp:
sec: 0
nanosec: 0
name: [shoulder_pan_joint, shoulder_lift_joint, elbow_joint, wrist_1_joint, wrist_2_joint, wrist_3_joint]
position: [0.139626, -2.05949, -1.48353, -1.20428, 1.69297, 0.20944]
velocity: []
effort: []
- name: Pick Block
joint_state:
header:
frame_id: world
stamp:
sec: 0
nanosec: 0
name: [shoulder_pan_joint, shoulder_lift_joint, elbow_joint, wrist_1_joint, wrist_2_joint, wrist_3_joint]
position: [2.89725, -2.0944, -1.50098, -1.0472, 1.69297, 0.20944]
velocity: []
effort: []
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,9 @@
<!-- Environment -->
<link name="environment">
<!-- Table -->
<xacro:cube_collision_and_visual length="2.0" width="2.0" height="0.25" alpha="0.0">
<xacro:cube_collision_and_visual length="2.0" width="2.0" height="0.25">
<origin rpy="0 0 0" xyz="0 0 ${-0.25/2}" />
<color rgba="0 0 1 0" />
</xacro:cube_collision_and_visual>
</link>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@
<Control ID="Sequence">
<!-- Pick object from "Grab", put it down at "Place", and go back to center pose -->
<Control ID="Sequence">
<Action ID="MoveToJointState" waypoint_name="Grab" planning_group_name="manipulator" controller_names="/joint_trajectory_controller /robotiq_gripper_controller"/>
<Action ID="MoveToJointState" waypoint_name="Pick Block" planning_group_name="manipulator" controller_names="/joint_trajectory_controller /robotiq_gripper_controller"/>
<Action ID="MoveGripperAction" gripper_command_action_name="/robotiq_gripper_controller/gripper_cmd" position="0.7929"/>
<Action ID="MoveToJointState" waypoint_name="Behind" planning_group_name="manipulator" controller_names="/joint_trajectory_controller /robotiq_gripper_controller"/>
<Action ID="MoveToJointState" waypoint_name="Place" planning_group_name="manipulator" controller_names="/joint_trajectory_controller /robotiq_gripper_controller"/>
<Action ID="MoveToJointState" waypoint_name="Place Block" planning_group_name="manipulator" controller_names="/joint_trajectory_controller /robotiq_gripper_controller"/>
<Action ID="MoveGripperAction" gripper_command_action_name="/robotiq_gripper_controller/gripper_cmd" position="0"/>
<Action ID="MoveToJointState" waypoint_name="Behind" planning_group_name="manipulator" controller_names="/joint_trajectory_controller /robotiq_gripper_controller"/>
</Control>
<!-- Pick object from "Place", put it down at "Grab", and go back to center pose -->
<Control ID="Sequence">
<Action ID="MoveToJointState" waypoint_name="Place" planning_group_name="manipulator" controller_names="/joint_trajectory_controller /robotiq_gripper_controller"/>
<Action ID="MoveToJointState" waypoint_name="Place Block" planning_group_name="manipulator" controller_names="/joint_trajectory_controller /robotiq_gripper_controller"/>
<Action ID="MoveGripperAction" gripper_command_action_name="/robotiq_gripper_controller/gripper_cmd" position="0.7929"/>
<Action ID="MoveToJointState" waypoint_name="Behind" planning_group_name="manipulator" controller_names="/joint_trajectory_controller /robotiq_gripper_controller"/>
<Action ID="MoveToJointState" waypoint_name="Grab" planning_group_name="manipulator" controller_names="/joint_trajectory_controller /robotiq_gripper_controller"/>
<Action ID="MoveToJointState" waypoint_name="Pick Block" planning_group_name="manipulator" controller_names="/joint_trajectory_controller /robotiq_gripper_controller"/>
<Action ID="MoveGripperAction" gripper_command_action_name="/robotiq_gripper_controller/gripper_cmd" position="0"/>
<Action ID="MoveToJointState" waypoint_name="Behind" planning_group_name="manipulator" controller_names="/joint_trajectory_controller /robotiq_gripper_controller"/>
</Control>
Expand Down

0 comments on commit 05aef75

Please sign in to comment.