tutorials/pick_and_place/Scripts_Part4/RealSimPickAndPlace.cs
/// <summary>
///     Publish the robot's current joint configuration, the target object's
///     position and rotation, and the target placement for the target object's
///     position and rotation.
///
///     Includes conversion from Unity coordinates to ROS coordinates, Forward Left Up
/// </summary>
Publish the robot's current joint configuration, the target object's
position and rotation, and the target placement for the target object's
position and rotation.

Includes conversion from Unity coordinates to ROS coordinates, Forward Left Up
Publish the robot ' s current joint configuration the target object ' s position and rotation and the target placement for the target object ' s position and rotation . Includes conversion from Unity coordinates to ROS coordinates Forward Left Up
public void PublishJoints()
    {
        MoverServiceRequest request = new MoverServiceRequest
        {
            joints_input =
            {
                joint_00 = jointArticulationBodies[0].xDrive.target,
                joint_01 = jointArticulationBodies[1].xDrive.target,
                joint_02 = jointArticulationBodies[2].xDrive.target,
                joint_03 = jointArticulationBodies[3].xDrive.target,
                joint_04 = jointArticulationBodies[4].xDrive.target,
                joint_05 = jointArticulationBodies[5].xDrive.target
            },
            pick_pose = new PoseMsg
            {
                position = (target.transform.position + PICK_POSE_OFFSET).To<FLU>(),
                orientation = Quaternion.Euler(90, target.transform.eulerAngles.y, 0).To<FLU>()
            },
            place_pose = new PoseMsg
            {
                position = (targetPlacement.transform.position + PICK_POSE_OFFSET).To<FLU>(),
                orientation = pickOrientation.To<FLU>()
            }
        };
        ros.Send(rosJointPublishTopicName, request);
    }
public void PublishJoints ( ) { MoverServiceRequest request = new MoverServiceRequest { joints_input = { joint_00 = jointArticulationBodies [ 0 ] . xDrive . target , joint_01 = jointArticulationBodies [ 1 ] . xDrive . target , joint_02 = jointArticulationBodies [ 2 ] . xDrive . target , joint_03 = jointArticulationBodies [ 3 ] . xDrive . target , joint_04 = jointArticulationBodies [ 4 ] . xDrive . target , joint_05 = jointArticulationBodies [ 5 ] . xDrive . target } , pick_pose = new PoseMsg { position = ( target . transform . position + PICK_POSE_OFFSET ) . To < FLU > ( ) , orientation = Quaternion . Euler ( 90 , target . transform . eulerAngles . y , 0 ) . To < FLU > ( ) } , place_pose = new PoseMsg { position = ( targetPlacement . transform . position + PICK_POSE_OFFSET ) . To < FLU > ( ) , orientation = pickOrientation . To < FLU > ( ) } } ; ros . Send ( rosJointPublishTopicName , request ) ; }
Publish the robot's current joint configuration, the target object's
position and rotation, and the target placement for the target object's
position and rotation.
Publish the robot ' s current joint configuration the target object ' s position and rotation and the target placement for the target object ' s position and rotation .
// The hardcoded x/z angles assure that the gripper is always positioned above the target cube before grasping.