diff --git a/src/factory_sim/config/config.yaml b/src/factory_sim/config/config.yaml index fc7d3c107..30f59ae70 100644 --- a/src/factory_sim/config/config.yaml +++ b/src/factory_sim/config/config.yaml @@ -96,6 +96,7 @@ ros2_control: controllers_active_at_startup: - "joint_trajectory_admittance_controller" - "joint_state_broadcaster" + - "force_torque_sensor_broadcaster" - "tool_attach_controller" - "suction_cup_controller" # Load but do not start these controllers so they can be activated later if needed. diff --git a/src/factory_sim/config/control/picknik_fanuc.ros2_control.yaml b/src/factory_sim/config/control/picknik_fanuc.ros2_control.yaml index d6d3a08cf..5c6d1600b 100644 --- a/src/factory_sim/config/control/picknik_fanuc.ros2_control.yaml +++ b/src/factory_sim/config/control/picknik_fanuc.ros2_control.yaml @@ -5,6 +5,8 @@ controller_manager: type: joint_state_broadcaster/JointStateBroadcaster joint_trajectory_admittance_controller: type: joint_trajectory_admittance_controller/JointTrajectoryAdmittanceController + force_torque_sensor_broadcaster: + type: force_torque_sensor_broadcaster/ForceTorqueSensorBroadcaster # A controller to enable/disable the tool attachment interface at the robot flange. # In sim, this is modeled as a weld constraint in Mujoco. # In a real robot, this controller would activate a mechanism to attach/detach the tool at the robot flange. @@ -48,17 +50,32 @@ joint_state_broadcaster: - position - velocity +force_torque_sensor_broadcaster: + ros__parameters: + # Hardware interface name. Matches the MuJoCo name; MujocoSystem + # exposes "/force.{x,y,z}" and "/torque.{x,y,z}" state interfaces. + sensor_name: wrist_ft_sensor + state_interface_names: + - force.x + - force.y + - force.z + - torque.x + - torque.y + - torque.z + # The frame the sensor reading is published in. + frame_id: tool0 + joint_trajectory_admittance_controller: ros__parameters: # Joint group to control. planning_group_name: manipulator - # Specifies the frame/link name of the force torque sensor. Must exist in the robot description. - sensor_frame: link_6 - # Specifies the frame/link name of the end-effector frame. Must exist in the robot description. - ee_frame: grasp_link + # Specifies the frame/link names of the force torque sensor(s). Must exist in the robot description. + sensor_frames: [tool0] + # Specifies the frame/link names of the end-effector frame(s). Must exist in the robot description. + ee_frames: [grasp_link] # The name of the force/torque ros2_control hardware interface which will be used in the admittance calculation. # If empty, the controller will run without admittance. - ft_sensor_name: "" + ft_sensor_name: wrist_ft_sensor # Joint accelerations to use for immediate stops (e.g. when cancelling a running trajectory). # Chosen to match MoveIt configs. stop_accelerations: [30.0, 30.0, 30.0, 30.0, 30.0, 30.0] @@ -81,7 +98,7 @@ joint_trajectory_admittance_controller: # provide the gravity vector in the base frame. gravity_vector: [0.0, 0.0, -9.8] # Default maximum joint-space deviation accepted along the trajectory, if not specified in the goal message. - default_path_tolerance: 0.6 + default_path_tolerance: 0.65 # Default maximum joint-space deviation accepted at the trajectory end-point, if not specified in the goal message. default_goal_tolerance: 0.05 # Default maximum absolute force torque readings allowed from the force torque sensor along each Cartesian space diff --git a/src/factory_sim/description/bracket_collision_geometry_0.xml b/src/factory_sim/description/bracket_collision_geometry_0.xml new file mode 100644 index 000000000..1809bfc36 --- /dev/null +++ b/src/factory_sim/description/bracket_collision_geometry_0.xml @@ -0,0 +1,553 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/factory_sim/description/bracket_collision_geometry_1.xml b/src/factory_sim/description/bracket_collision_geometry_1.xml new file mode 100644 index 000000000..e85d60022 --- /dev/null +++ b/src/factory_sim/description/bracket_collision_geometry_1.xml @@ -0,0 +1,553 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/factory_sim/description/bracket_collision_geometry_2.xml b/src/factory_sim/description/bracket_collision_geometry_2.xml new file mode 100644 index 000000000..28b6b7470 --- /dev/null +++ b/src/factory_sim/description/bracket_collision_geometry_2.xml @@ -0,0 +1,553 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/factory_sim/description/scene.xml b/src/factory_sim/description/scene.xml index 8a75412ab..a8f1a3661 100644 --- a/src/factory_sim/description/scene.xml +++ b/src/factory_sim/description/scene.xml @@ -4,6 +4,8 @@ + + @@ -234,13 +236,17 @@ - - - - - - - + + + + @@ -413,21 +419,29 @@ + + + + + + - + - - + + + + diff --git a/src/factory_sim/objectives/pick_up_tool_from_holder.xml b/src/factory_sim/objectives/pick_up_tool_from_holder.xml index dbe2b9b65..4463f20d3 100644 --- a/src/factory_sim/objectives/pick_up_tool_from_holder.xml +++ b/src/factory_sim/objectives/pick_up_tool_from_holder.xml @@ -26,6 +26,12 @@ trajectory_monitoring="false" /> + - + diff --git a/src/factory_sim/objectives/retract.xml b/src/factory_sim/objectives/retract.xml index 2b332672e..8eed459e3 100644 --- a/src/factory_sim/objectives/retract.xml +++ b/src/factory_sim/objectives/retract.xml @@ -24,7 +24,7 @@ acceleration_scale="0.5" axis_x="0.000000" axis_y="0.000000" - ignore_environment_collisions="false" + ignore_environment_collisions="{ignore_environment_collisions}" planning_group_name="manipulator" velocity_scale="0.5" task="{mtc_task}" @@ -44,6 +44,7 @@ + diff --git a/src/factory_sim/objectives/vacuum_pick_bracket_part_subtree.xml b/src/factory_sim/objectives/vacuum_pick_bracket_part_subtree.xml index 044a4d878..236adf775 100644 --- a/src/factory_sim/objectives/vacuum_pick_bracket_part_subtree.xml +++ b/src/factory_sim/objectives/vacuum_pick_bracket_part_subtree.xml @@ -1,9 +1,8 @@ - @@ -20,14 +19,17 @@ output_pose="{approach_pose}" translation_xyz="0;0;0.15" quaternion_xyzw="-0.0; -1.0; -0.0; -0.0" - name="Create approach pose before straight pick" + name="Create approach pose above bracket" /> + @@ -53,28 +55,89 @@ trajectory_sampling_rate="100" velocity_scale_factor="1.000000" /> - + + + + + + + + + + + + + + + +