Commit 977fb713 authored by Lorenz Halt's avatar Lorenz Halt 🔀
Browse files

add apps for lin/approach/force

parent cbe231e7
......@@ -6,6 +6,8 @@
<include package="pitasc_library" file="models/pitasc.xml"/>
<!-- <include package="pitasc_library" file="models/skills.xml"/> -->
<include package="ilc" file="models/ilc_controllers.xml"/>
<include package="ilc" file="models/ilc_scripts.xml"/>
<include package="pitasc_library" file="universal_robots/ur.xml"/>
<!-- <include package="ilc" file="models/skills.xml"/> -->
......@@ -22,7 +24,9 @@
<member id="environment">
<!-- Add a UR5 -->
<clone prototype="robot_ur5">
<member id="robot_driver.max_velocity">10</member>
<!-- <member id="robot_driver.max_velocity">0.02</member>
<member id="robot_driver.max_acceleration">1</member>
<member id="robot_driver.max_velocity">10</member> -->
<member id="robot_driver.max_acceleration">10</member>
<member id="components">
<clone prototype="force_sensor">
......@@ -45,86 +49,73 @@
<!-- Move to target1 (lin) -->
<!-- <clone prototype="skill_lin_ilc"> -->
<clone prototype="skill_lin">
<clone prototype="skill_ptp">
<member id="joint_names">elbow_joint, shoulder_lift_joint, shoulder_pan_joint, wrist_1_joint, wrist_2_joint, wrist_3_joint</member>
<member id="target_joint_state">-1.9282563368426722, -1.6304424444781702, -1.5087736288653772, -1.1538098494159144, 1.560910940170288, -0.7429631392108362</member>
</clone>
<clone id="above_ground_lin" prototype="skill_lin">
<member id="tool_frame">ee_link</member>
<member id="target_frame">start_position</member>
<member id="linear_controller_gain">5</member>
<member id="max_linear_velocity">15</member>
<member id="monitors">
<clone prototype="monitor_duration">
<member id="duration">20</member>
</clone>
</member>
<member id="target_frame">above_ground</member>
<member id="linear_controller_gain">0.5</member>
<member id="max_linear_velocity">5</member>
</clone>
<clone prototype="skill_lin">
<member id="tool_frame">ee_link</member>
<member id="target_frame">above_ground</member>
<member id="linear_controller_gain">0.5</member>
<member id="max_linear_velocity">50</member>
<member id="tasks.tracking.controllers">
<clone prototype="p_controller_ilc">
<member id="filename_in">/home/victor/ilc_ws/src/ilc/etc/vel_ff.txt</member>
<member id="filename_out">/home/victor/ilc_ws/src/ilc/Logs/error_lin.csv</member>
<member id="data_source">
<reference reference_id="collections.target_to_tool.chains[0]"/>
</member>
<member id="setpoint_generator">
<reference reference_id="setpoint_generators.setpoint"/>
</member>
<member id="coordinates">x, y, z</member>
<member id="prefix" reference_id="prefix"/>
<member id="limit" reference_id="max_linear_velocity"/>
<member id="gain" reference_id="linear_controller_gain"/>
</clone>
<!-- orientation controller -->
<clone prototype="tanh_controller">
<member id="max_output" reference_id="max_angular_velocity"/>
<member id="P_lin" reference_id="angular_controller_gain"/>
<member id="data_source">
<reference reference_id="collections.target_to_tool.chains[0]"/>
</member>
<member id="setpoint_generator">
<reference reference_id="setpoint_generators.setpoint"/>
</member>
<member id="coordinates">a, b, c</member>
<member id="prefix" reference_id="prefix"/>
</clone>
</member>
<member id="linear_controller_gain">0.5</member>
<member id="max_linear_velocity">5</member>
</clone>
<clone prototype="skill_guarded_approach">
<member id="tool_frame">ee_link</member>
<member id="target_frame">intermediate_position_low</member>
<member id="positioning_monitor.samples">200</member>
<member id="control_frame">kms40</member>
<member id="axes">z</member>
<member id="velocities">0.005</member>
<member id="max_force">5.0</member>
<member id="move_skill.tasks.velocity_feedforward.controllers">
<clone prototype="velocity_controller_ilc">
<member id="filename_in">/home/ipa325/Documents/ilc_Logs/Logs/vel_ff_2.txt</member>
<member id="data_source">
<reference reference_id="collections.target_to_eef.chains[0]"/>
</member>
<member id="setpoint_generator">
<reference reference_id="setpoint_generators.setpoint"/>
</member>
<member id="coordinates">x, y, z</member>
<member id="prefix" reference_id="prefix"/>
<member id="velocities" reference_id="velocities"/>
</clone>
</member>
<member id="monitors">
<clone prototype="monitor_duration">
<member id="duration">20</member>
</clone>
<member id="scripts">
<clone prototype="script_measurement_logger">
<member id="provider" reference_id="force_skill.collections.force_chain.chains"/>
<member id="file_name">/home/ipa325/Documents/ilc_Logs/approach_force_0.csv</member>
<member id="filter">force_chain/z</member>
</clone>
</member>
<member id="scripts">
<clone prototype="script_measurement_logger">
<member id="provider" reference_id="force_skill.collections.force_chain.chains"/>
<member id="file_name">/home/ipa325/Documents/ilc_Logs/approach_force_0.csv</member>
<member id="filter">force_chain/x</member>
</clone>
</member>
</clone>
<clone prototype="skill_lin">
<member id="tool_frame">ee_link</member>
<member id="target_frame">above_ground</member>
</clone>
<clone prototype="skill_lin">
<member id="tool_frame">ee_link</member>
<member id="target_frame">start_position</member>
<!-- <member id="linear_controller_gain">5</member>
<member id="max_linear_velocity">15</member> -->
<member id="monitors">
<clone prototype="monitor_duration">
<member id="duration">20</member>
</clone>
</member>
</clone>
</member>
</clone>
......
<?xml version="1.0" encoding="UTF-8"?>
<pitasc>
<models>
<include package="pitasc_library" file="models/pitasc.xml"/>
<!-- <include package="pitasc_library" file="models/skills.xml"/> -->
<include package="ilc" file="models/ilc_controllers.xml"/>
<include package="ilc" file="models/ilc_scripts.xml"/>
<include package="pitasc_library" file="universal_robots/ur.xml"/>
<!-- <include package="ilc" file="models/skills.xml"/> -->
</models>
<!-- Create a project -->
<clone prototype="project">
<member id="configuration">
<!-- Use the default configuration with recommended settings -->
<clone id="configuration" prototype="default_configuration"/>
</member>
<member id="environment">
<!-- Add a UR5 -->
<clone prototype="robot_ur5">
<!-- <member id="robot_driver.max_velocity">0.02</member>
<member id="robot_driver.max_acceleration">1</member>
<member id="robot_driver.max_velocity">10</member> -->
<member id="robot_driver.max_acceleration">10</member>
<member id="components">
<clone prototype="force_sensor">
<member id="wrench_topic">wrench</member>
</clone>
</member>
</clone>
</member>
<member id="applications">
<!-- Use a skill sequence as a container -->
<clone prototype="skill_sequence">
<!-- Use the UR5 for this skill (and for its subskill) -->
<member id="robot" reference_id="environment.robot_ur5"/>
<!-- Add subskill(s) -->
<member id="skills">
<!-- Move to target1 (lin) -->
<!-- <clone prototype="skill_lin_ilc"> -->
<clone prototype="skill_ptp">
<member id="joint_names">elbow_joint, shoulder_lift_joint, shoulder_pan_joint, wrist_1_joint, wrist_2_joint, wrist_3_joint</member>
<member id="target_joint_state">-1.9282563368426722, -1.6304424444781702, -1.5087736288653772, -1.1538098494159144, 1.560910940170288, -0.7429631392108362</member>
</clone>
<clone prototype="skill_lin">
<member id="tool_frame">ee_link</member>
<member id="target_frame">above_ground</member>
<member id="linear_controller_gain">0.5</member>
<member id="max_linear_velocity">5</member>
</clone>
<clone prototype="skill_guarded_approach">
<member id="tool_frame">ee_link</member>
<member id="control_frame">kms40</member>
<member id="axes">z</member>
<member id="velocities">0.005</member>
<member id="max_force">5.0</member>
</clone>
<clone id="ilc_push_settle" prototype="skill_push_settle">
<member id="tool_frame">ee_link</member>
<member id="force.force_frame">kms40</member>
<member id="force.axes">z</member>
<member id="force.target_forces">10.0</member>
<member id="force.compliance">0.0005</member>
<member id="force.corner_frequency">7</member>
<member id="force.tasks.apply_force.controllers">
<clone id="ilc_controller" prototype="first_order_impedance_controller_ilc">
<member id="filename_in">/home/ipa325/Documents/ilc_Logs/force_ff_2.txt</member>
<member id="data_source">
<reference reference_id="collections.force_chain.chains[0]"/>
</member>
<member id="setpoint_generator">
<reference reference_id="setpoint_generators.setpoint"/>
</member>
<member id="coordinates">x, y, z</member>
<member id="prefix" reference_id="prefix"/>
</clone>
</member>
<member id="scripts">
<clone prototype="script_error_logger">
<member id="controllers">
<reference reference_id="force.tasks.apply_force.controllers.first_order_impedance_controller"/>
</member>
<member id="file_name">/home/ipa325/Documents/ilc_Logs/force_logger_0.csv</member>
<member id="filter">force_chain/x,force_chain/y,force_chain/z</member>
</clone>
</member>
</clone>
<clone prototype="skill_lin">
<member id="tool_frame">ee_link</member>
<member id="target_frame">above_ground</member>
<member id="scripts">
<clone prototype="script_trigger_ilc">
<member id="service_name">ilc_service</member>
<member id="file_in">/home/ipa325/Documents/ilc_Logs/force_logger_0.csv</member>
<member id="file_out">/home/ipa325/Documents/ilc_Logs/force_ff_2.txt</member>
<member id="traj_type">e</member>
<member id="L">0.00005</member>
<member id="cutoff_freq">0.9</member>
</clone>
<clone prototype="script_retime_if_ilc">
<member id="service_name">ilc_retime_if</member>
<member id="on_start">false</member>
<member id="retime_factor">0.9</member>
<member id="convergence_threshold">10</member>
<member id="reuse_ff">True</member>
<member id="reuse_scheme">1</member>
</clone>
</member>
<member id="transitions">
<clone prototype="transition">
<member id="event">succeeded</member>
<member id="target">skill_ptp</member>
</clone>
</member>
</clone>
-->
</member>
</clone>
</member>
</clone>
</pitasc>
......@@ -4,10 +4,13 @@
<models>
<include package="pitasc_library" file="models/pitasc.xml"/>
<include package="pitasc_library" file="universal_robots/ur.xml"/>
<!-- <include package="pitasc_library" file="models/skills.xml"/> -->
<include package="ilc" file="models/ilc_controllers.xml"/>
<include package="ilc" file="models/ilc_scripts.xml"/>
<include package="pitasc_library" file="universal_robots/ur.xml"/>
<!-- <include package="ilc" file="models/skills.xml"/> -->
</models>
<!-- Create a project -->
......@@ -21,7 +24,7 @@
<member id="environment">
<!-- Add a UR5 -->
<clone prototype="robot_ur5">
<member id="robot_driver.max_velocity">10</member>
<member id="robot_driver.max_velocity">20</member>
<member id="robot_driver.max_acceleration">10</member>
<member id="components">
<clone prototype="force_sensor">
......@@ -38,24 +41,35 @@
<!-- Use the UR5 for this skill (and for its subskill) -->
<member id="robot" reference_id="environment.robot_ur5"/>
<!-- Add subskill(s) -->
<member id="skills">
<!-- Move ptp -->
<clone prototype="skill_ptp">
<member id="joint_names">elbow_joint, shoulder_pan_joint, wrist_3_joint, wrist_1_joint, shoulder_lift_joint, wrist_2_joint</member>
<member id="target_joint_state">1.5111723007545828, 1.6092279039888917, -3.141917966357802, 2.9014219134662995, -1.3423824706872163, -3.1797213696262983</member>
<!-- Move to target1 (lin) -->
<!-- <clone prototype="skill_lin_ilc"> -->
<clone prototype="skill_ptp">
<member id="joint_names">elbow_joint, shoulder_lift_joint, shoulder_pan_joint, wrist_1_joint, wrist_2_joint, wrist_3_joint</member>
<member id="target_joint_state">-0.8761704603778284, -1.705047909413473, -1.5110262076007288, -2.1497629324542444, 1.5639780759811401, -0.7346790472613733</member>
</clone>
<clone prototype="skill_lin">
<member id="tool_frame">ee_link</member>
<member id="target_frame">start</member>
</clone>
<clone prototype="skill_lin">
<member id="tool_frame">ee_link</member>
<member id="target_frame">start_position</member>
<member id="target_frame">goal</member>
</clone>
<clone id="ilc_skill" prototype="skill_lin">
<member id="tool_frame">ee_link</member>
<member id="target_frame">intermediate_position_low</member>
<member id="target_frame">start</member>
<member id="linear_controller_gain">0.5</member>
<member id="max_linear_velocity">10</member>
<member id="linear_controller_gain">5</member>
<member id="max_linear_velocity">5</member>
<member id="tasks.tracking.setpoint_generators">
<clone id="setpoint" prototype="constant_setpoint">
......@@ -70,7 +84,7 @@
<member id="tasks.tracking.controllers">
<clone id="ilc_controller" prototype="p_controller_ilc">
<member id="filename_in">/home/victor/ilc_ws/src/ilc/Logs/lin_ff_2_1D.txt</member>
<member id="filename_in">/home/ipa325/Documents/ilc_Logs/lin_ff_2.txt</member>
<member id="data_source">
<reference reference_id="collections.target_to_tool.chains[0]"/>
......@@ -105,27 +119,36 @@
<!-- Controller must be declared before referencing -->
<reference reference_id="tasks.tracking.controllers.ilc_controller"/>
</member>
<member id="file_name">/home/victor/ilc_ws/src/ilc/Logs/logger_0_1D.csv</member>
<member id="filter">target_to_tool/z</member>
<member id="file_name">/home/ipa325/Documents/ilc_Logs/logger_0.csv</member>
</clone>
</member>
</clone>
<clone prototype="skill_lin">
<member id="tool_frame">ee_link</member>
<member id="target_frame">start_position</member>
<member id="target_frame">start</member>
<member id="scripts">
<clone prototype="script_trigger_ilc">
<member id="service_name">ilc_service</member>
<member id="file_in">/home/victor/ilc_ws/src/ilc/Logs/logger_0_1D.csv</member>
<member id="file_out">/home/victor/ilc_ws/src/ilc/Logs/lin_ff_2_1D.txt</member>
<member id="file_traj">/home/victor/ilc_ws/src/ilc/Logs/trajectory_1D.txt</member>
<member id="file_in">/home/ipa325/Documents/ilc_Logs/logger_0.csv</member>
<member id="file_out">/home/ipa325/Documents/ilc_Logs/lin_ff_2.txt</member>
<member id="file_traj">/home/ipa325/Documents/ilc_Logs/trajectory.txt</member>
<member id="traj_type">cos</member>
<member id="L">0.3</member>
<member id="L">0.6</member>
<member id="cutoff_freq">0.5</member>
</clone>
</member>
<clone prototype="script_retime_if_ilc">
<member id="service_name">ilc_retime_if</member>
<member id="on_start">false</member>
<member id="retime_factor">0.9</member>
<member id="convergence_threshold">0.02</member>
<member id="reuse_ff">True</member>
<member id="reuse_scheme">1</member>
</clone>
</member>
<member id="transitions">
<clone prototype="transition">
......@@ -135,6 +158,9 @@
</member>
</clone>
</member>
</clone>
</member>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment