Commit 8330da59 authored by Lorenz Halt's avatar Lorenz Halt 🔀
Browse files

another approach for setpointGen

parent 95687900
<?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">20</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">-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_position</member>
</clone>
<clone prototype="skill_lin">
<member id="tool_frame">ee_link</member>
<member id="target_frame">goal_position</member>
</clone>
<clone id="ilc_skill" prototype="skill_lin">
<member id="tool_frame">ee_link</member>
<member id="target_frame">start_position</member>
<member id="tasks.tracking.controllers">
<!-- position controller -->
<clone prototype="tanh_controller_ilc">
<member id="filename_in">/tmp/ilc/lin_ff_2.txt</member>
<member id="max_output" reference_id="max_linear_velocity"/>
<member id="P_lin" reference_id="linear_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" reference_id="setpoint_generators.setpoint.symbol_groups.position_coordinates"/>
<member id="prefix" reference_id="prefix"/>
</clone>
<!-- orientation controller -->
<clone prototype="tanh_controller">
<!-- <member id="filename_in">/tmp/ilc/lin_ff_2.txt</member> -->
<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" reference_id="setpoint_generators.setpoint.symbol_groups.orientation_coordinates"/>
<member id="prefix" reference_id="prefix"/>
</clone>
</member>
<member id="scripts">
<clone prototype="script_measurement_logger">
<member id="provider" reference_id="collections.target_to_tool.chains"/>
<member id="file_name">/tmp/ilc/logger_meas.csv</member>
<member id="filter">target_to_tool/x,target_to_tool/y,target_to_tool/z</member>
</clone>
<!-- <clone prototype="script_error_logger">
<member id="controllers">
Controller must be declared before referencing
<reference reference_id="tasks.tracking.controllers.ilc_controller"/>
</member>
<member id="file_name">/tmp/ilc/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="scripts">
<clone prototype="script_trigger_ilc_meas">
<member id="namespace">ilc_rosproxy</member>
<member id="service_name">ilc_service_meas</member>
<member id="file_in">/tmp/ilc/logger_meas.csv</member>
<member id="file_out">/tmp/ilc/lin_ff_2.txt</member>
<member id="file_traj">/tmp/ilc/trajectory.txt</member>
<member id="traj_type">cos</member>
<member id="L">0.6</member>
<member id="cutoff_freq">0.5</member>
<member id="time_shift">0</member>
<member id="setpoint">0,0,0</member>
</clone>
<clone prototype="script_retime_if_ilc">
<member id="namespace">ilc_rosproxy</member>
<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">
<member id="event">succeeded</member>
<member id="target">start</member>
</clone>
</member>
</clone>
</member>
</clone>
</member>
</clone>
</pitasc>
......@@ -123,6 +123,49 @@
</data>
</type>
<type id="tanh_controller_ilc" prototype="controller">
<meta>
<member id="description">Controller with smoothly saturated output. The controller transfer function is realized using a tanh.
The approx. linear steepness of the tanh is parametrized by defining the gain factor 'P_lin' at 90% of 'max_error'.</member>
<member id="implementation">
<clone prototype="orocos">
<member id="package">ilc_controllers</member>
<member id="component">TanHControllerILC</member>
<member id="arguments">filename_in, max_output, P_lin, update_rate, data_source, setpoint_generator, coordinates, prefix</member>
</clone>
</member>
</meta>
<data>
<type id="filename_in" prototype="string_parameter">
<member id="description">Filename to be loaded for feedforward</member>
</type>
<type id="data_source" data_type="parameter:data_source" prototype="base">
</type>
<type id="setpoint_generator" data_type="parameter:setpoint_generator" prototype="base">
</type>
<type id="coordinates" prototype="string_csv">
</type>
<type id="prefix" prototype="string_parameter">
</type>
<type id="max_output" prototype="float_parameter">
<meta>
<member id="description">Upper bound on the output value (or L2 norm).</member>
</meta>
</type>
<type id="max_error" prototype="float_parameter">
<meta>
<member id="description">Error (L2 norm) at which 90% of max_output is returned.</member>
</meta>
</type>
<type id="P_lin" prototype="float_parameter">
<meta>
<member id="description">Equivalent proportional controller in linear region.</member>
</meta>
</type>
</data>
</type>
</models>
</pitasc>
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