From 4c8bc3585f08dcadf92c3e077adf440be2ec5f58 Mon Sep 17 00:00:00 2001 From: Michalis Logothetis Date: Mon, 14 May 2018 17:56:16 +0300 Subject: [PATCH] change hardware interface port and namespace --- .../config/real_controllers_ns.yaml | 47 ++ .../launch/pa10_controller_spawner.launch | 49 +- .../scripts/pa10_hardware_interface.cpp | 3 +- pa10_moveit_config/launch/moveit.rviz | 531 +++--------------- 4 files changed, 160 insertions(+), 470 deletions(-) create mode 100644 pa10_hardware_interface/config/real_controllers_ns.yaml diff --git a/pa10_hardware_interface/config/real_controllers_ns.yaml b/pa10_hardware_interface/config/real_controllers_ns.yaml new file mode 100644 index 0000000..bebb5fb --- /dev/null +++ b/pa10_hardware_interface/config/real_controllers_ns.yaml @@ -0,0 +1,47 @@ +joint_names: [S1,S2,E1,E2,W1,W2,W3,finger_joint_1,finger_joint_2] + +pa10: +# Publish all joint states ----------------------------------- +joint_state_controller: + type: joint_state_controller/JointStateController + publish_rate: 50 + +# Position Controllers --------------------------------------- +arm_controller: + #type: position_controllers/JointGroupPositionController + type: "velocity_controllers/JointTrajectoryController" + #type: "position_controllers/JointTrajectoryController" + #type: "effort_controllers/JointTrajectoryController" + + joints: + - S1 + - S2 + - E1 + - E2 + - W1 + - W2 + - W3 + gains: + S1: {p: 10.0, i: 0.2, d: 0.05, i_clamp: 2.5} + S2: {p: 10.0, i: 0.2, d: 0.05, i_clamp: 2.5} + E1: {p: 10.0, i: 0.2, d: 0.05, i_clamp: 2.5} + E2: {p: 10.0, i: 0.2, d: 0.05, i_clamp: 2.5} + W1: {p: 10.0, i: 0.2, d: 0.05, i_clamp: 2.5} + W2: {p: 10.0, i: 0.2, d: 0.05, i_clamp: 2.5} + W3: {p: 10.0, i: 0.2, d: 0.05, i_clamp: 2.5} + + constraints: + goal_time: 0.5 # Override default + state_publish_rate: 50 # Override default + action_monitor_rate: 20 # Override default + stop_trajectory_duration: 0 # Override default + +gripper_controller: + #type: "position_controllers/JointTrajectoryController" + type: "velocity_controllers/JointTrajectoryController" + joints: + - finger_joint_1 + - finger_joint_2 + gains: + finger_joint_1: &gripper_finger_gains {p: 1.0, d: 0.05, i: 0.1, i_clamp: 1.0} + finger_joint_2: *gripper_finger_gains diff --git a/pa10_hardware_interface/launch/pa10_controller_spawner.launch b/pa10_hardware_interface/launch/pa10_controller_spawner.launch index 8c7d980..1fa49b8 100644 --- a/pa10_hardware_interface/launch/pa10_controller_spawner.launch +++ b/pa10_hardware_interface/launch/pa10_controller_spawner.launch @@ -1,31 +1,48 @@ - - - - - + + + + + + - - + + - - + + + - + + - - + + + + + + + + + + - + + + + + + + + + diff --git a/pa10_hardware_interface/scripts/pa10_hardware_interface.cpp b/pa10_hardware_interface/scripts/pa10_hardware_interface.cpp index c45269f..ff4dc6c 100644 --- a/pa10_hardware_interface/scripts/pa10_hardware_interface.cpp +++ b/pa10_hardware_interface/scripts/pa10_hardware_interface.cpp @@ -139,7 +139,8 @@ class pa10 : public hardware_interface::RobotHW host_info.ai_family = AF_UNSPEC; // IP version not specified. Can be both. host_info.ai_socktype = SOCK_STREAM; // Use SOCK_STREAM for TCP or SOCK_DGRAM for UDP. - status = getaddrinfo("147.102.51.71", "4534", &host_info, &host_info_list); + //status = getaddrinfo("147.102.51.71", "4534", &host_info, &host_info_list); + status = getaddrinfo("192.168.1.71", "4534", &host_info, &host_info_list); if (status != 0){ std::cout << "getaddrinfo error" << gai_strerror(status) ; diff --git a/pa10_moveit_config/launch/moveit.rviz b/pa10_moveit_config/launch/moveit.rviz index 8b2b768..73f0a82 100644 --- a/pa10_moveit_config/launch/moveit.rviz +++ b/pa10_moveit_config/launch/moveit.rviz @@ -6,7 +6,7 @@ Panels: Expanded: - /MotionPlanning1 Splitter Ratio: 0.74256 - Tree Height: 664 + Tree Height: 346 - Class: rviz/Help Name: Help - Class: rviz/Views @@ -37,300 +37,115 @@ Visualization Manager: Value: true - Class: moveit_rviz_plugin/MotionPlanning Enabled: true + Move Group Namespace: /pa10 MoveIt_Goal_Tolerance: 0 + MoveIt_Planning_Attempts: 10 MoveIt_Planning_Time: 5 MoveIt_Use_Constraint_Aware_IK: true MoveIt_Warehouse_Host: 127.0.0.1 MoveIt_Warehouse_Port: 33829 + MoveIt_Workspace: + Center: + X: 0 + Y: 0 + Z: 0 + Size: + X: 2 + Y: 2 + Z: 2 Name: MotionPlanning Planned Path: + Color Enabled: false + Interrupt Display: false Links: - base_bellow_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - base_footprint: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true + All Links Enabled: true + Expand Joint Details: false + Expand Link Details: false + Expand Tree: false + Link Tree Style: Links in Alphabetic Order base_link: Alpha: 1 Show Axes: false Show Trail: false Value: true - bl_caster_l_wheel_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - bl_caster_r_wheel_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - bl_caster_rotation_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - br_caster_l_wheel_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - br_caster_r_wheel_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - br_caster_rotation_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - double_stereo_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - fl_caster_l_wheel_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - fl_caster_r_wheel_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - fl_caster_rotation_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - fr_caster_l_wheel_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - fr_caster_r_wheel_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - fr_caster_rotation_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - head_mount_kinect_ir_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - head_mount_kinect_rgb_link: + kinect2_ir_optical_frame: Alpha: 1 Show Axes: false Show Trail: false - Value: true - head_mount_link: + kinect2_rgb_optical_frame: Alpha: 1 Show Axes: false Show Trail: false Value: true - head_mount_prosilica_link: + link_ee_tool: Alpha: 1 Show Axes: false Show Trail: false - Value: true - head_pan_link: + link_elbow_1: Alpha: 1 Show Axes: false Show Trail: false Value: true - head_plate_frame: + link_elbow_2: Alpha: 1 Show Axes: false Show Trail: false Value: true - head_tilt_link: + link_finger_1: Alpha: 1 Show Axes: false Show Trail: false Value: true - l_elbow_flex_link: + link_finger_2: Alpha: 1 Show Axes: false Show Trail: false Value: true - l_forearm_link: + link_gripper_base: Alpha: 1 Show Axes: false Show Trail: false Value: true - l_forearm_roll_link: + link_shoulder_1: Alpha: 1 Show Axes: false Show Trail: false Value: true - l_gripper_l_finger_link: + link_shoulder_2: Alpha: 1 Show Axes: false Show Trail: false Value: true - l_gripper_l_finger_tip_link: + link_shoulder_to_elbow: Alpha: 1 Show Axes: false Show Trail: false - Value: true - l_gripper_motor_accelerometer_link: + link_wrist_1: Alpha: 1 Show Axes: false Show Trail: false Value: true - l_gripper_palm_link: + link_wrist_2: Alpha: 1 Show Axes: false Show Trail: false Value: true - l_gripper_r_finger_link: + link_wrist_3: Alpha: 1 Show Axes: false Show Trail: false - Value: true - l_gripper_r_finger_tip_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - l_shoulder_lift_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - l_shoulder_pan_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - l_upper_arm_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - l_upper_arm_roll_link: + world: Alpha: 1 Show Axes: false Show Trail: false - Value: true - l_wrist_flex_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - l_wrist_roll_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - laser_tilt_mount_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - r_elbow_flex_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - r_forearm_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - r_forearm_roll_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - r_gripper_l_finger_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - r_gripper_l_finger_tip_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - r_gripper_motor_accelerometer_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - r_gripper_palm_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - r_gripper_r_finger_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - r_gripper_r_finger_tip_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - r_shoulder_lift_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - r_shoulder_pan_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - r_upper_arm_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - r_upper_arm_roll_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - r_wrist_flex_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - r_wrist_roll_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - sensor_mount_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - torso_lift_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true Loop Animation: true Robot Alpha: 0.5 + Robot Color: 150; 50; 150 Show Robot Collision: false Show Robot Visual: true Show Trail: false State Display Time: 0.05 s + Trail Step Size: 1 Trajectory Topic: move_group/display_planned_path Planning Metrics: Payload: 1 @@ -338,20 +153,21 @@ Visualization Manager: Show Manipulability: false Show Manipulability Index: false Show Weight Limit: false + TextHeight: 0.08 Planning Request: Colliding Link Color: 255; 0; 0 Goal State Alpha: 1 Goal State Color: 250; 128; 0 Interactive Marker Size: 0 Joint Violation Color: 255; 0; 255 - Planning Group: left_arm + Planning Group: arm Query Goal State: true Query Start State: false Show Workspace: false Start State Alpha: 1 Start State Color: 0; 255; 0 - Planning Scene Topic: move_group/monitored_planning_scene - Robot Description: robot_description + Planning Scene Topic: /pa10/move_group/monitored_planning_scene + Robot Description: /pa10/robot_description Scene Geometry: Scene Alpha: 1 Scene Color: 50; 230; 50 @@ -362,293 +178,95 @@ Visualization Manager: Scene Robot: Attached Body Color: 150; 50; 150 Links: - base_bellow_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - base_footprint: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true + All Links Enabled: true + Expand Joint Details: false + Expand Link Details: false + Expand Tree: false + Link Tree Style: Links in Alphabetic Order base_link: Alpha: 1 Show Axes: false Show Trail: false Value: true - bl_caster_l_wheel_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - bl_caster_r_wheel_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - bl_caster_rotation_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - br_caster_l_wheel_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - br_caster_r_wheel_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - br_caster_rotation_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - double_stereo_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - fl_caster_l_wheel_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - fl_caster_r_wheel_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - fl_caster_rotation_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - fr_caster_l_wheel_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - fr_caster_r_wheel_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - fr_caster_rotation_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - head_mount_kinect_ir_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - head_mount_kinect_rgb_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - head_mount_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - head_mount_prosilica_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - head_pan_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - head_plate_frame: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - head_tilt_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - l_elbow_flex_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - l_forearm_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - l_forearm_roll_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - l_gripper_l_finger_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - l_gripper_l_finger_tip_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - l_gripper_motor_accelerometer_link: + kinect2_ir_optical_frame: Alpha: 1 Show Axes: false Show Trail: false - Value: true - l_gripper_palm_link: + kinect2_rgb_optical_frame: Alpha: 1 Show Axes: false Show Trail: false Value: true - l_gripper_r_finger_link: + link_ee_tool: Alpha: 1 Show Axes: false Show Trail: false - Value: true - l_gripper_r_finger_tip_link: + link_elbow_1: Alpha: 1 Show Axes: false Show Trail: false Value: true - l_shoulder_lift_link: + link_elbow_2: Alpha: 1 Show Axes: false Show Trail: false Value: true - l_shoulder_pan_link: + link_finger_1: Alpha: 1 Show Axes: false Show Trail: false Value: true - l_upper_arm_link: + link_finger_2: Alpha: 1 Show Axes: false Show Trail: false Value: true - l_upper_arm_roll_link: + link_gripper_base: Alpha: 1 Show Axes: false Show Trail: false Value: true - l_wrist_flex_link: + link_shoulder_1: Alpha: 1 Show Axes: false Show Trail: false Value: true - l_wrist_roll_link: + link_shoulder_2: Alpha: 1 Show Axes: false Show Trail: false Value: true - laser_tilt_mount_link: + link_shoulder_to_elbow: Alpha: 1 Show Axes: false Show Trail: false - Value: true - r_elbow_flex_link: + link_wrist_1: Alpha: 1 Show Axes: false Show Trail: false Value: true - r_forearm_link: + link_wrist_2: Alpha: 1 Show Axes: false Show Trail: false Value: true - r_forearm_roll_link: + link_wrist_3: Alpha: 1 Show Axes: false Show Trail: false - Value: true - r_gripper_l_finger_link: + world: Alpha: 1 Show Axes: false Show Trail: false - Value: true - r_gripper_l_finger_tip_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - r_gripper_motor_accelerometer_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - r_gripper_palm_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - r_gripper_r_finger_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - r_gripper_r_finger_tip_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - r_shoulder_lift_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - r_shoulder_pan_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - r_upper_arm_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - r_upper_arm_roll_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - r_wrist_flex_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - r_wrist_roll_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - sensor_mount_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true - torso_lift_link: - Alpha: 1 - Show Axes: false - Show Trail: false - Value: true Robot Alpha: 0.5 - Show Scene Robot: true + Show Robot Collision: false + Show Robot Visual: true Value: true Enabled: true Global Options: Background Color: 48; 48; 48 - Fixed Frame: /world + Fixed Frame: world + Frame Rate: 30 Name: root Tools: - Class: rviz/Interact @@ -660,6 +278,11 @@ Visualization Manager: Current: Class: rviz/XYOrbit Distance: 2.9965 + Enable Stereo Rendering: + Stereo Eye Separation: 0.06 + Stereo Focal Distance: 1 + Swap Stereo Eyes: false + Value: false Focal Point: X: 0.113567 Y: 0.10592 @@ -667,23 +290,25 @@ Visualization Manager: Name: Current View Near Clip Distance: 0.01 Pitch: 0.509797 - Target Frame: /world + Target Frame: world Value: XYOrbit (rviz) Yaw: 5.65995 Saved: ~ Window Geometry: Displays: collapsed: false - Height: 1337 + Height: 1056 Help: collapsed: false Hide Left Dock: false Hide Right Dock: false - Motion Planning: + MotionPlanning: + collapsed: false + MotionPlanning - Slider: collapsed: false - QMainWindow State: 000000ff00000000fd0000000100000000000002a2000004bcfc0200000005fb000000100044006900730070006c00610079007301000000410000032d000000dd00fffffffb0000000800480065006c00700000000342000000bb0000007600fffffffb0000000a0056006900650077007300000003b0000000b0000000b000fffffffb0000000c00430061006d00650072006100000002ff000001610000000000000000fb0000001e004d006f00740069006f006e00200050006c0061006e006e0069006e00670100000374000001890000017400ffffff0000047a000004bc00000001000000020000000100000002fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000 + QMainWindow State: 000000ff00000000fd0000000100000000000002a2000003dafc0200000007fb000000100044006900730070006c0061007900730100000028000001ef000000dd00fffffffb0000000800480065006c00700000000342000000bb0000007600fffffffb0000000a0056006900650077007300000003b0000000b0000000b000fffffffb0000000c00430061006d00650072006100000002ff000001610000000000000000fb0000001e004d006f00740069006f006e00200050006c0061006e006e0069006e00670100000374000001890000000000000000fb0000002e004d006f00740069006f006e0050006c0061006e006e0069006e00670020002d00200053006c00690064006500720000000000ffffffff0000004a00fffffffb0000001c004d006f00740069006f006e0050006c0061006e006e0069006e0067010000021d000001e5000001cc00ffffff00000497000003da00000001000000020000000100000002fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000 Views: collapsed: false - Width: 1828 - X: 459 - Y: -243 + Width: 1855 + X: 65 + Y: 24