public com.robotraconteur.robotics.robot.RobotInfo ToRRInfo() { var info = new com.robotraconteur.robotics.robot.RobotInfo(); CopyTo(info); return(info); }
public MotomanHSCRobot(com.robotraconteur.robotics.robot.RobotInfo robot_info) : base(robot_info, -1) { _uses_homing = false; _has_position_command = true; _has_velocity_command = false; _update_period = 2; robot_info.robot_capabilities &= (uint)(RobotCapabilities.jog_command & RobotCapabilities.position_command & RobotCapabilities.trajectory_command); }
public SawyerRobot(com.robotraconteur.robotics.robot.RobotInfo robot_info, string ros_ns_prefix = "") : base(robot_info, 7) { this._ros_ns_prefix = ""; if (robot_info.joint_info == null) { _joint_names = Enumerable.Range(0, 7).Select(x => $"right_j{x}").ToArray(); } this._trajectory_error_tol = 1000; }
public ABBRobot(com.robotraconteur.robotics.robot.RobotInfo robot_info) : base(robot_info, -1) { _uses_homing = false; _has_position_command = true; _has_velocity_command = false; _update_period = 4; robot_info.robot_capabilities &= (uint)(RobotCapabilities.jog_command & RobotCapabilities.position_command & RobotCapabilities.trajectory_command); this._trajectory_error_tol = 1000; }
public BaxterRobot(com.robotraconteur.robotics.robot.RobotInfo robot_info, BaxterRobotArmSelection arm_selection, string ros_ns_prefix = "") : base(robot_info, 14) { this._ros_ns_prefix = ""; if (robot_info.joint_info == null) { throw new ArgumentException("Robot joint info must be provided"); } _joint_names_right = new string[] { "right_s0", "right_s1", "right_e0", "right_e1", "right_w0", "right_w1", "right_w2" }; _joint_names_left = new string[] { "left_s0", "left_s1", "left_e0", "left_e1", "left_w0", "left_w1", "left_w2" }; switch (arm_selection) { case BaxterRobotArmSelection.both: { string[] _both_joint_names = new string[] { "left_s0", "left_s1", "left_e0", "left_e1", "left_w0", "left_w1", "left_w2", "right_s0", "right_s1", "right_e0", "right_e1", "right_w0", "right_w1", "right_w2" }; if (!Enumerable.SequenceEqual(_joint_names, _both_joint_names)) { throw new ArgumentException("Invalid joint names specified for both arms"); } _arm_selection = BaxterRobotArmSelection.both; break; } case BaxterRobotArmSelection.left: { if (!Enumerable.SequenceEqual(_joint_names, _joint_names_left)) { throw new ArgumentException("Invalid joint names specified for left arm"); } _arm_selection = BaxterRobotArmSelection.left; break; } case BaxterRobotArmSelection.right: { if (!Enumerable.SequenceEqual(_joint_names, _joint_names_right)) { throw new ArgumentException("Invalid joint names specified for right arm"); } _arm_selection = BaxterRobotArmSelection.right; break; } default: throw new ArgumentException("Invalid arm selection"); } }
public void CopyTo(com.robotraconteur.robotics.robot.RobotInfo robot_info) { robot_info.device_info = device_info?.ToRRInfo(); robot_info.robot_type = robot_type; robot_info.joint_info = joint_info?.Select(x => x?.ToRRInfo()).ToList(); robot_info.chains = chains?.Select(x => x?.ToRRInfo()).ToList(); robot_info.robot_capabilities = (uint)(robot_capabilities?.Aggregate((x, y) => x | y) ?? 0); robot_info.signal_info = signal_info?.Select(x => x?.ToRRInfo()).ToList(); robot_info.parameter_info = parameter_info?.Select(x => x?.ToRRInfo()).ToList(); robot_info.extended = extended?.ToDictionary(x => x.Key, x => x.Value?.value); }