robotic 0.2.9.dev1__cp312-cp312-manylinux2014_x86_64.whl → 0.3.0__cp312-cp312-manylinux2014_x86_64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- robotic/__init__.py +4 -0
- robotic/_robotic.pyi +13 -13
- robotic/_robotic.so +0 -0
- robotic/include/rai/Algo/rungeKutta.h +1 -1
- robotic/include/rai/Control/TimingMPC.h +2 -2
- robotic/include/rai/Core/array.h +64 -40
- robotic/include/rai/Core/array.ipp +247 -81
- robotic/include/rai/Core/arrayDouble.h +10 -13
- robotic/include/rai/Core/graph.h +22 -2
- robotic/include/rai/Core/h5.h +3 -1
- robotic/include/rai/Core/util.h +8 -7
- robotic/include/rai/Geo/fclInterface.h +3 -1
- robotic/include/rai/Geo/geo.h +6 -2
- robotic/include/rai/Geo/mesh.h +11 -5
- robotic/include/rai/Geo/pairCollision.h +4 -4
- robotic/include/rai/Gui/RenderData.h +4 -3
- robotic/include/rai/Gui/opengl.h +1 -1
- robotic/include/rai/KOMO/komo.h +1 -0
- robotic/include/rai/KOMO/manipTools.h +2 -2
- robotic/include/rai/Kin/F_forces.h +1 -1
- robotic/include/rai/Kin/dof_forceExchange.h +4 -4
- robotic/include/rai/Kin/frame.h +6 -5
- robotic/include/rai/Kin/kin.h +26 -17
- robotic/include/rai/Kin/kin_physx.h +2 -2
- robotic/include/rai/Logic/folWorld.h +1 -1
- robotic/include/rai/Optim/testProblems_Opt.h +2 -2
- robotic/include/rai/Optim/utils.h +2 -2
- robotic/include/rai/PathAlgos/ConfigurationProblem.h +3 -2
- robotic/include/rai/PathAlgos/RRT_PathFinder.h +1 -1
- robotic/include/rai/ry/types.h +3 -2
- robotic/librai.so +0 -0
- robotic/meshTool +0 -0
- robotic/mujoco-import.py +10 -0
- robotic/rai-robotModels/g1/g1.g +11 -2
- robotic/rai-robotModels/g1/g1_clean.g +38 -73
- robotic/rai-robotModels/g1/meshes/head_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/left_ankle_pitch_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/left_ankle_roll_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/left_elbow_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/left_hip_pitch_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/left_hip_roll_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/left_hip_yaw_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/left_knee_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/left_rubber_hand.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/left_shoulder_pitch_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/left_shoulder_roll_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/left_shoulder_yaw_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/left_wrist_pitch_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/left_wrist_roll_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/left_wrist_yaw_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/logo_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/pelvis.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/pelvis_contour_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/right_ankle_pitch_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/right_ankle_roll_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/right_elbow_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/right_hip_pitch_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/right_hip_roll_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/right_hip_yaw_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/right_knee_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/right_rubber_hand.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/right_shoulder_pitch_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/right_shoulder_roll_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/right_shoulder_yaw_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/right_wrist_pitch_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/right_wrist_roll_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/right_wrist_yaw_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/torso_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/waist_roll_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/waist_support_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/waist_yaw_link.h5 +0 -0
- robotic/rai-robotModels/objects/shelf.g +1 -1
- robotic/rai-robotModels/panda/meshes/finger.h5 +0 -0
- robotic/rai-robotModels/panda/meshes/hand.h5 +0 -0
- robotic/rai-robotModels/panda/meshes/link0.h5 +0 -0
- robotic/rai-robotModels/panda/meshes/link1.h5 +0 -0
- robotic/rai-robotModels/panda/meshes/link2.h5 +0 -0
- robotic/rai-robotModels/panda/meshes/link3.h5 +0 -0
- robotic/rai-robotModels/panda/meshes/link4.h5 +0 -0
- robotic/rai-robotModels/panda/meshes/link5.h5 +0 -0
- robotic/rai-robotModels/panda/meshes/link6.h5 +0 -0
- robotic/rai-robotModels/panda/meshes/link7.h5 +0 -0
- robotic/rai-robotModels/panda/panda.g +1 -1
- robotic/rai-robotModels/panda/panda_arm_hand_conv.g +24 -0
- robotic/rai-robotModels/panda/panda_arm_hand_conv.yml +24 -0
- robotic/rai-robotModels/panda/panda_clean.g +21 -45
- robotic/rai-robotModels/panda/panda_gripper.g +3 -3
- robotic/rai-robotModels/pr2/meshes/base.h5 +0 -0
- robotic/rai-robotModels/pr2/meshes/base_color.png +0 -0
- robotic/rai-robotModels/pr2/meshes/caster.h5 +0 -0
- robotic/rai-robotModels/pr2/meshes/elbow_flex.h5 +0 -0
- robotic/rai-robotModels/pr2/meshes/elbow_flex_color.png +0 -0
- robotic/rai-robotModels/pr2/meshes/forearm.h5 +0 -0
- robotic/rai-robotModels/pr2/meshes/forearm_color.png +0 -0
- robotic/rai-robotModels/pr2/meshes/forearm_roll.h5 +0 -0
- robotic/rai-robotModels/pr2/meshes/gripper_palm.h5 +0 -0
- robotic/rai-robotModels/pr2/meshes/gripper_palm_color.png +0 -0
- robotic/rai-robotModels/pr2/meshes/head_pan.h5 +0 -0
- robotic/rai-robotModels/pr2/meshes/head_pan_color.png +0 -0
- robotic/rai-robotModels/pr2/meshes/head_tilt.h5 +0 -0
- robotic/rai-robotModels/pr2/meshes/head_tilt_color.png +0 -0
- robotic/rai-robotModels/pr2/meshes/l_finger.h5 +0 -0
- robotic/rai-robotModels/pr2/meshes/l_finger_color.png +0 -0
- robotic/rai-robotModels/pr2/meshes/l_finger_tip.h5 +0 -0
- robotic/rai-robotModels/pr2/meshes/l_finger_tip_color.png +0 -0
- robotic/rai-robotModels/pr2/meshes/shoulder_lift.h5 +0 -0
- robotic/rai-robotModels/pr2/meshes/shoulder_lift_color.png +0 -0
- robotic/rai-robotModels/pr2/meshes/shoulder_pan.h5 +0 -0
- robotic/rai-robotModels/pr2/meshes/shoulder_pan_color.png +0 -0
- robotic/rai-robotModels/pr2/meshes/tilting_hokuyo.h5 +0 -0
- robotic/rai-robotModels/pr2/meshes/tilting_hokuyo_color.png +0 -0
- robotic/rai-robotModels/pr2/meshes/torso_lift.h5 +0 -0
- robotic/rai-robotModels/pr2/meshes/torso_lift_color.png +0 -0
- robotic/rai-robotModels/pr2/meshes/upper_arm.h5 +0 -0
- robotic/rai-robotModels/pr2/meshes/upper_arm_color.png +0 -0
- robotic/rai-robotModels/pr2/meshes/upper_arm_roll.h5 +0 -0
- robotic/rai-robotModels/pr2/meshes/upper_arm_roll_color.png +0 -0
- robotic/rai-robotModels/pr2/meshes/wheel.h5 +0 -0
- robotic/rai-robotModels/pr2/meshes/wheel_color.png +0 -0
- robotic/rai-robotModels/pr2/meshes/wrist_color.png +0 -0
- robotic/rai-robotModels/pr2/meshes/wrist_flex.h5 +0 -0
- robotic/rai-robotModels/pr2/meshes/wrist_roll.h5 +0 -0
- robotic/rai-robotModels/pr2/pr2.g +7 -7
- robotic/rai-robotModels/pr2/pr2_clean.g +119 -115
- robotic/rai-robotModels/pr2/pr2_conv.g +218 -0
- robotic/rai-robotModels/pr2/pr2_modifications.g +2 -2
- robotic/rai-robotModels/ranger/meshes/ranger_mini3.h5 +0 -0
- robotic/rai-robotModels/ranger/meshes/ranger_mini_v3_wheel.h5 +0 -0
- robotic/rai-robotModels/ranger/meshes/ranger_mini_v3_wheel_right.h5 +0 -0
- robotic/rai-robotModels/ranger/ranger.g +8 -8
- robotic/rai-robotModels/ranger/ranger_clean.g +5 -5
- robotic/rai-robotModels/ranger/ranger_mini_conv.g +14 -0
- robotic/rai-robotModels/robotiq/meshes/robotiq_arg2f_85_base_link.h5 +0 -0
- robotic/rai-robotModels/robotiq/meshes/robotiq_arg2f_85_inner_finger.h5 +0 -0
- robotic/rai-robotModels/robotiq/meshes/robotiq_arg2f_85_inner_knuckle.h5 +0 -0
- robotic/rai-robotModels/robotiq/meshes/robotiq_arg2f_85_outer_finger.h5 +0 -0
- robotic/rai-robotModels/robotiq/meshes/robotiq_arg2f_85_outer_knuckle.h5 +0 -0
- robotic/rai-robotModels/robotiq/robotiq.g +2 -2
- robotic/rai-robotModels/robotiq/robotiq_clean.g +16 -16
- robotic/rai-robotModels/scenarios/ballFinger.g +2 -2
- robotic/rai-robotModels/scenarios/panda_fixRobotiq.g +3 -3
- robotic/rai-robotModels/tests/arm.g +11 -11
- robotic/rai-robotModels/tests/compound.g +3 -6
- robotic/rai-robotModels/ur10/meshes/base.h5 +0 -0
- robotic/rai-robotModels/ur10/meshes/forearm.h5 +0 -0
- robotic/rai-robotModels/ur10/meshes/shoulder.h5 +0 -0
- robotic/rai-robotModels/ur10/meshes/upperarm.h5 +0 -0
- robotic/rai-robotModels/ur10/meshes/wrist1.h5 +0 -0
- robotic/rai-robotModels/ur10/meshes/wrist2.h5 +0 -0
- robotic/rai-robotModels/ur10/meshes/wrist3.h5 +0 -0
- robotic/rai-robotModels/ur10/ur10.g +2 -2
- robotic/rai-robotModels/ur10/ur10_clean.g +8 -8
- robotic/rai-robotModels/ur10/ur10_conv.g +17 -0
- robotic/ry-h5info +2 -2
- robotic/ry-urdfConvert.py +74 -0
- robotic/src/cleanMeshes.py +59 -0
- robotic/src/config_urdf.py +237 -0
- robotic/src/mesh_helper.py +395 -0
- robotic/{rai-robotModels/ranger/meshes/cleanMeshes.mlx → src/meshlabFilters.mlx} +0 -3
- robotic/src/mujoco_io.py +242 -0
- robotic/src/yaml_helper.py +19 -0
- robotic/test.py +15 -0
- robotic/version.py +1 -1
- {robotic-0.2.9.dev1.data → robotic-0.3.0.data}/scripts/ry-h5info +2 -2
- robotic-0.3.0.data/scripts/ry-urdfConvert.py +74 -0
- {robotic-0.2.9.dev1.dist-info → robotic-0.3.0.dist-info}/METADATA +3 -7
- robotic-0.3.0.dist-info/RECORD +367 -0
- {robotic-0.2.9.dev1.dist-info → robotic-0.3.0.dist-info}/WHEEL +1 -1
- robotic/import.py +0 -0
- robotic/rai-robotModels/baxter/baxter.g +0 -49
- robotic/rai-robotModels/baxter/baxter_clean.g +0 -116
- robotic/rai-robotModels/baxter/baxter_clean2.g +0 -205
- robotic/rai-robotModels/baxter/baxter_clean3.g +0 -223
- robotic/rai-robotModels/baxter/baxter_description/meshes/base/PEDESTAL.ply +0 -0
- robotic/rai-robotModels/baxter/baxter_description/meshes/base/pedestal_link_collision.ply +0 -0
- robotic/rai-robotModels/baxter/baxter_description/meshes/head/H0.ply +0 -0
- robotic/rai-robotModels/baxter/baxter_description/meshes/head/H1.ply +0 -0
- robotic/rai-robotModels/baxter/baxter_description/meshes/lower_elbow/E1.ply +0 -0
- robotic/rai-robotModels/baxter/baxter_description/meshes/lower_forearm/W1.ply +0 -0
- robotic/rai-robotModels/baxter/baxter_description/meshes/lower_shoulder/S1.ply +0 -0
- robotic/rai-robotModels/baxter/baxter_description/meshes/torso/base_link.ply +0 -0
- robotic/rai-robotModels/baxter/baxter_description/meshes/torso/base_link_collision.ply +0 -0
- robotic/rai-robotModels/baxter/baxter_description/meshes/upper_elbow/E0.ply +0 -0
- robotic/rai-robotModels/baxter/baxter_description/meshes/upper_forearm/W0.ply +0 -0
- robotic/rai-robotModels/baxter/baxter_description/meshes/upper_shoulder/S0.ply +0 -0
- robotic/rai-robotModels/baxter/baxter_description/meshes/wrist/W2.ply +0 -0
- robotic/rai-robotModels/baxter/baxter_new.g +0 -53
- robotic/rai-robotModels/baxter/rethink_ee_description/meshes/electric_gripper/electric_gripper_base.ply +0 -0
- robotic/rai-robotModels/baxter/rethink_ee_description/meshes/electric_gripper/fingers/extended_narrow.ply +0 -0
- robotic/rai-robotModels/baxter/rethink_ee_description/meshes/electric_gripper/fingers/half_round_tip.ply +0 -0
- robotic/rai-robotModels/baxter/rethink_ee_description/meshes/electric_gripper/fingers/paddle_tip.ply +0 -0
- robotic/rai-robotModels/baxter/rethink_ee_description/meshes/pneumatic_gripper/pneumatic_gripper_base.ply +0 -0
- robotic/rai-robotModels/baxter/rethink_ee_description/meshes/pneumatic_gripper/pneumatic_gripper_w_cup.ply +0 -0
- robotic/rai-robotModels/g1/meshes/head_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/left_ankle_pitch_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/left_ankle_roll_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/left_elbow_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/left_hand_index_0_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/left_hand_index_1_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/left_hand_middle_0_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/left_hand_middle_1_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/left_hand_palm_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/left_hand_thumb_0_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/left_hand_thumb_1_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/left_hand_thumb_2_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/left_hip_pitch_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/left_hip_roll_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/left_hip_yaw_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/left_knee_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/left_rubber_hand.ply +0 -0
- robotic/rai-robotModels/g1/meshes/left_shoulder_pitch_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/left_shoulder_roll_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/left_shoulder_yaw_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/left_wrist_pitch_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/left_wrist_roll_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/left_wrist_roll_rubber_hand.ply +0 -0
- robotic/rai-robotModels/g1/meshes/left_wrist_yaw_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/logo_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/pelvis.ply +0 -0
- robotic/rai-robotModels/g1/meshes/pelvis_contour_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/right_ankle_pitch_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/right_ankle_roll_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/right_elbow_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/right_hand_index_0_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/right_hand_index_1_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/right_hand_middle_0_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/right_hand_middle_1_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/right_hand_palm_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/right_hand_thumb_0_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/right_hand_thumb_1_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/right_hand_thumb_2_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/right_hip_pitch_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/right_hip_roll_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/right_hip_yaw_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/right_knee_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/right_rubber_hand.ply +0 -0
- robotic/rai-robotModels/g1/meshes/right_shoulder_pitch_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/right_shoulder_roll_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/right_shoulder_yaw_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/right_wrist_pitch_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/right_wrist_roll_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/right_wrist_roll_rubber_hand.ply +0 -0
- robotic/rai-robotModels/g1/meshes/right_wrist_yaw_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/torso_constraint_L_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/torso_constraint_L_rod_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/torso_constraint_R_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/torso_constraint_R_rod_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/torso_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/waist_constraint_L.ply +0 -0
- robotic/rai-robotModels/g1/meshes/waist_constraint_R.ply +0 -0
- robotic/rai-robotModels/g1/meshes/waist_roll_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/waist_support_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/waist_yaw_link.ply +0 -0
- robotic/rai-robotModels/panda/franka_description/meshes/collision/finger.stl +0 -0
- robotic/rai-robotModels/panda/franka_description/meshes/collision/hand.stl +0 -0
- robotic/rai-robotModels/panda/franka_description/meshes/collision/link0.stl +0 -0
- robotic/rai-robotModels/panda/franka_description/meshes/collision/link1.stl +0 -0
- robotic/rai-robotModels/panda/franka_description/meshes/collision/link2.stl +0 -0
- robotic/rai-robotModels/panda/franka_description/meshes/collision/link3.stl +0 -0
- robotic/rai-robotModels/panda/franka_description/meshes/collision/link4.stl +0 -0
- robotic/rai-robotModels/panda/franka_description/meshes/collision/link5.stl +0 -0
- robotic/rai-robotModels/panda/franka_description/meshes/collision/link6.stl +0 -0
- robotic/rai-robotModels/panda/franka_description/meshes/collision/link7.stl +0 -0
- robotic/rai-robotModels/panda/franka_description/meshes/visual/HOWTO.sh +0 -10
- robotic/rai-robotModels/panda/franka_description/meshes/visual/HOWTO2.sh +0 -7
- robotic/rai-robotModels/panda/franka_description/meshes/visual/convMeshes.mlx +0 -38
- robotic/rai-robotModels/panda/franka_description/meshes/visual/finger.ply +0 -0
- robotic/rai-robotModels/panda/franka_description/meshes/visual/hand.ply +0 -0
- robotic/rai-robotModels/panda/franka_description/meshes/visual/link0.ply +0 -0
- robotic/rai-robotModels/panda/franka_description/meshes/visual/link1.ply +0 -0
- robotic/rai-robotModels/panda/franka_description/meshes/visual/link2.ply +0 -0
- robotic/rai-robotModels/panda/franka_description/meshes/visual/link3.ply +0 -0
- robotic/rai-robotModels/panda/franka_description/meshes/visual/link4.ply +0 -0
- robotic/rai-robotModels/panda/franka_description/meshes/visual/link5.ply +0 -0
- robotic/rai-robotModels/panda/franka_description/meshes/visual/link6.ply +0 -0
- robotic/rai-robotModels/panda/franka_description/meshes/visual/link7.ply +0 -0
- robotic/rai-robotModels/panda/franka_description/meshes/visual/script.mlx +0 -28
- robotic/rai-robotModels/pr2/pr2_description/meshes/base_v0/base.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/base_v0/base_L.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/base_v0/caster.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/base_v0/caster_L.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/base_v0/pr2_wheel.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/base_v0/wheel.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/forearm_v0/forearm.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/forearm_v0/wrist_flex.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/forearm_v0/wrist_roll.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/forearm_v0/wrist_roll_L.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/gripper_v0/gripper_palm.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/gripper_v0/l_finger.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/gripper_v0/l_finger_tip.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/head_v0/head_pan.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/head_v0/head_pan_L.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/head_v0/head_tilt.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/head_v0/head_tilt_L.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/shoulder_v0/shoulder_lift.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/shoulder_v0/shoulder_pan.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/shoulder_v0/shoulder_yaw.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/shoulder_v0/upper_arm_roll.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/shoulder_v0/upper_arm_roll_L.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/tilting_laser_v0/hok_tilt.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/tilting_laser_v0/tilting_hokuyo.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/tilting_laser_v0/tilting_hokuyo_L.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/torso_v0/torso.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/torso_v0/torso_lift.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/torso_v0/torso_lift_L.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/upper_arm_v0/elbow_flex.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/upper_arm_v0/forearm_roll.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/upper_arm_v0/forearm_roll_L.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/upper_arm_v0/upper_arm.ply +0 -0
- robotic/rai-robotModels/ranger/meshes/cleanMeshes.sh +0 -8
- robotic/rai-robotModels/ranger/meshes/ranger_mini3.ply +0 -0
- robotic/rai-robotModels/ranger/meshes/ranger_mini_v3_wheel.ply +0 -0
- robotic/rai-robotModels/ranger/meshes/ranger_mini_v3_wheel_right.ply +0 -0
- robotic/rai-robotModels/robotiq/meshes/visual/robotiq_arg2f_85_base_link.ply +0 -0
- robotic/rai-robotModels/robotiq/meshes/visual/robotiq_arg2f_85_base_link_x.ply +0 -10
- robotic/rai-robotModels/robotiq/meshes/visual/robotiq_arg2f_85_inner_finger.ply +0 -0
- robotic/rai-robotModels/robotiq/meshes/visual/robotiq_arg2f_85_inner_knuckle.ply +0 -0
- robotic/rai-robotModels/robotiq/meshes/visual/robotiq_arg2f_85_outer_finger.ply +0 -0
- robotic/rai-robotModels/robotiq/meshes/visual/robotiq_arg2f_85_outer_knuckle.ply +0 -0
- robotic/rai-robotModels/robotiq/meshes/visual/robotiq_arg2f_85_pad.ply +0 -0
- robotic/rai-robotModels/robotiq/meshes/visual/robotiq_gripper_coupling.ply +0 -0
- robotic/rai-robotModels/ur10/ur_description/meshes/ur10/visual/Base.ply +0 -0
- robotic/rai-robotModels/ur10/ur_description/meshes/ur10/visual/Forearm.ply +0 -0
- robotic/rai-robotModels/ur10/ur_description/meshes/ur10/visual/Shoulder.ply +0 -0
- robotic/rai-robotModels/ur10/ur_description/meshes/ur10/visual/UpperArm.ply +0 -0
- robotic/rai-robotModels/ur10/ur_description/meshes/ur10/visual/Wrist1.ply +0 -0
- robotic/rai-robotModels/ur10/ur_description/meshes/ur10/visual/Wrist2.ply +0 -0
- robotic/rai-robotModels/ur10/ur_description/meshes/ur10/visual/Wrist3.ply +0 -0
- robotic/ry-urdf2rai +0 -222
- robotic/ry-urdf2yaml +0 -250
- robotic-0.2.9.dev1.data/scripts/ry-urdf2rai +0 -222
- robotic-0.2.9.dev1.data/scripts/ry-urdf2yaml +0 -250
- robotic-0.2.9.dev1.dist-info/RECORD +0 -421
- /robotic/rai-robotModels/robotiq/meshes/{visual/robotiq_ft300.ply → robotiq_ft300.ply} +0 -0
- {robotic-0.2.9.dev1.data → robotic-0.3.0.data}/scripts/ry-bot +0 -0
- {robotic-0.2.9.dev1.data → robotic-0.3.0.data}/scripts/ry-info +0 -0
- {robotic-0.2.9.dev1.data → robotic-0.3.0.data}/scripts/ry-meshTool +0 -0
- {robotic-0.2.9.dev1.data → robotic-0.3.0.data}/scripts/ry-test +0 -0
- {robotic-0.2.9.dev1.data → robotic-0.3.0.data}/scripts/ry-view +0 -0
- {robotic-0.2.9.dev1.dist-info → robotic-0.3.0.dist-info}/licenses/LICENSE +0 -0
- {robotic-0.2.9.dev1.dist-info → robotic-0.3.0.dist-info}/top_level.txt +0 -0
robotic/__init__.py
CHANGED
|
@@ -9,5 +9,9 @@ from .version import __version__
|
|
|
9
9
|
|
|
10
10
|
from .manipulation import KOMO_ManipulationHelper
|
|
11
11
|
|
|
12
|
+
from .src.mujoco_io import MujocoLoader
|
|
13
|
+
from .src.config_urdf import URDFLoader
|
|
14
|
+
from .src.mesh_helper import MeshHelper
|
|
15
|
+
|
|
12
16
|
import os
|
|
13
17
|
setRaiPath( os.path.abspath(os.path.dirname(__file__)) + '/rai-robotModels' )
|
robotic/_robotic.pyi
CHANGED
|
@@ -275,7 +275,7 @@ class Config:
|
|
|
275
275
|
"""
|
|
276
276
|
animate with random spline in limits bounding box [T=#spline points]
|
|
277
277
|
"""
|
|
278
|
-
def asDict(self) -> dict:
|
|
278
|
+
def asDict(self, parentsInKeys: bool = True) -> dict:
|
|
279
279
|
"""
|
|
280
280
|
return the configuration description as a dict, e.g. for file export
|
|
281
281
|
"""
|
|
@@ -291,6 +291,10 @@ class Config:
|
|
|
291
291
|
"""
|
|
292
292
|
clear all frames and additional data; becomes the empty configuration, with no frames
|
|
293
293
|
"""
|
|
294
|
+
def coll_totalViolation(self) -> float:
|
|
295
|
+
"""
|
|
296
|
+
returns the sum of all penetrations (using FCL for broadphase; and low-level GJK/MRP for fine pair-wise distance/penetration computation)
|
|
297
|
+
"""
|
|
294
298
|
def computeCollisions(self) -> None:
|
|
295
299
|
"""
|
|
296
300
|
[should be obsolete; getCollision* methods auto ensure proxies] call the broadphase collision engine (SWIFT++ or FCL) to generate the list of collisions (or near proximities) between all frame shapes that have the collision tag set non-zero
|
|
@@ -311,18 +315,10 @@ class Config:
|
|
|
311
315
|
"""
|
|
312
316
|
returns the list of collisable pairs -- this should help debugging the 'contact' flag settings in a configuration
|
|
313
317
|
"""
|
|
314
|
-
def getCollisionFree(self) -> bool:
|
|
315
|
-
"""
|
|
316
|
-
returns if the configuration is collision free (binary collision check, using FCL only; collidable objects need to have contact flag)
|
|
317
|
-
"""
|
|
318
318
|
def getCollisions(self, belowMargin: float = 1.0) -> list:
|
|
319
319
|
"""
|
|
320
320
|
return the results of collision computations: a list of 3 tuples with (frame1, frame2, distance). Optionally report only on distances below a margin To get really precise distances and penetrations use the FS.distance feature with the two frame names
|
|
321
321
|
"""
|
|
322
|
-
def getCollisionsTotalPenetration(self) -> float:
|
|
323
|
-
"""
|
|
324
|
-
returns the sum of all penetrations (using FCL for broadphase; and low-level GJK/MRP for fine pair-wise distance/penetration computation)
|
|
325
|
-
"""
|
|
326
322
|
def getFrame(self, frameName: str, warnIfNotExist: bool = True) -> Frame:
|
|
327
323
|
"""
|
|
328
324
|
get access to a frame by name; use the Frame methods to set/get frame properties
|
|
@@ -367,7 +363,7 @@ class Config:
|
|
|
367
363
|
"""
|
|
368
364
|
collect all inertia at root frame of links, optionally reestimate all inertias based on standard surface density, optionally relocate the link frame to the COM with diagonalized I)
|
|
369
365
|
"""
|
|
370
|
-
def processStructure(self,
|
|
366
|
+
def processStructure(self, pruneRigidJoints: bool = False, reconnectToLinks: bool = True, pruneNonContactShapes: bool = False, pruneTransparent: bool = False) -> None:
|
|
371
367
|
"""
|
|
372
368
|
structurally simplify the Configuration (deleting frames, relinking to minimal tree)
|
|
373
369
|
"""
|
|
@@ -411,6 +407,10 @@ class Config:
|
|
|
411
407
|
"""
|
|
412
408
|
return the focal length of the view camera (only intrinsic parameter)
|
|
413
409
|
"""
|
|
410
|
+
def view_focus(self, frameName: str, absHeight: float = 2.0) -> None:
|
|
411
|
+
"""
|
|
412
|
+
focus on a particular frame, given via name; second argument distances camara so that view window has roughly given absHeight around object
|
|
413
|
+
"""
|
|
414
414
|
def view_fxycxy(self) -> arr:
|
|
415
415
|
"""
|
|
416
416
|
return (fx, fy, cx, cy): the focal length and image center in PIXEL UNITS
|
|
@@ -453,7 +453,7 @@ class Config:
|
|
|
453
453
|
"""
|
|
454
454
|
write the full configuration in a ply mesh file
|
|
455
455
|
"""
|
|
456
|
-
def writeMeshes(self, pathPrefix: ..., copyTextures: bool) -> None:
|
|
456
|
+
def writeMeshes(self, pathPrefix: ..., copyTextures: bool = True, enumerateAssets: bool = False) -> None:
|
|
457
457
|
"""
|
|
458
458
|
write all object meshes in a directory
|
|
459
459
|
"""
|
|
@@ -788,11 +788,11 @@ class Frame:
|
|
|
788
788
|
"""
|
|
789
789
|
def setImplicitSurface(self, data: ..., size: arr, blur: int, resample: float = -1.0) -> Frame:
|
|
790
790
|
...
|
|
791
|
-
def setJoint(self, jointType: JT, limits: arr =
|
|
791
|
+
def setJoint(self, jointType: JT, limits: arr = ..., scale: float = 1.0, mimic: Frame = None) -> Frame:
|
|
792
792
|
...
|
|
793
793
|
def setJointState(self, arg0: arr) -> Frame:
|
|
794
794
|
...
|
|
795
|
-
def setMass(self,
|
|
795
|
+
def setMass(self, mass: float, inertiaMatrix: arr = ...) -> Frame:
|
|
796
796
|
...
|
|
797
797
|
def setMesh(self, vertices: arr, triangles: uintA, colors: ... = ..., cvxParts: uintA = ...) -> Frame:
|
|
798
798
|
"""
|
robotic/_robotic.so
CHANGED
|
Binary file
|
|
@@ -19,7 +19,7 @@ void rk4(arr& x, const arr& x0, const fct& f, double dt);
|
|
|
19
19
|
//void rk4dd(arr& x1, arr& v1, const arr& x0, const arr& v0,
|
|
20
20
|
// void (*ddf)(arr& xdd, const arr& x, const arr& v),
|
|
21
21
|
// double dt);
|
|
22
|
-
|
|
22
|
+
arr rk4_2ndOrder(const arr& x0, const std::function<arr (const arr&, const arr&)>& f, double dt);
|
|
23
23
|
|
|
24
24
|
/** RK with discrete event localization (zero-crossing detection): the
|
|
25
25
|
function sf computes some double-valued indicators. If one of
|
|
@@ -44,8 +44,8 @@ struct TimingMPC {
|
|
|
44
44
|
|
|
45
45
|
uint nPhases() const { return waypoints.d0; }
|
|
46
46
|
bool done() const { return phase>=nPhases(); }
|
|
47
|
-
arr getWaypoints() const { if(done()) return waypoints[-1].copy().reshape(1, -1); return waypoints({phase, -1}).copy(); }
|
|
48
|
-
arr getTimes() const { if(done()) return {.1}; return integral(tau({phase, -1})); }
|
|
47
|
+
arr getWaypoints() const { if(done()) return waypoints[-1].copy().reshape(1, -1); return waypoints({phase, -1+1}).copy(); }
|
|
48
|
+
arr getTimes() const { if(done()) return {.1}; return integral(tau({phase, -1+1})); }
|
|
49
49
|
arr getVels() const;
|
|
50
50
|
|
|
51
51
|
bool set_progressedTime(double gap, double tauCutoff=0.);
|
robotic/include/rai/Core/array.h
CHANGED
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
#include <initializer_list>
|
|
15
15
|
#include <tuple>
|
|
16
16
|
#include <iostream>
|
|
17
|
+
#include <memory>
|
|
18
|
+
#include <vector>
|
|
17
19
|
|
|
18
20
|
using std::endl;
|
|
19
21
|
|
|
@@ -26,6 +28,8 @@ namespace rai {
|
|
|
26
28
|
extern const char* arrayElemsep;
|
|
27
29
|
extern const char* arrayLinesep;
|
|
28
30
|
extern const char* arrayBrackets;
|
|
31
|
+
extern int64_t globalMemoryTotal, globalMemoryBound;
|
|
32
|
+
extern bool globalMemoryStrict;
|
|
29
33
|
|
|
30
34
|
// default sorting methods
|
|
31
35
|
template<class T> bool lower(const T& a, const T& b) { return a<b; }
|
|
@@ -42,9 +46,13 @@ template<class T> bool greaterEqual(const T& a, const T& b) { return a>=b; }
|
|
|
42
46
|
|
|
43
47
|
namespace rai {
|
|
44
48
|
|
|
49
|
+
//fwd declarations
|
|
45
50
|
template<class T> struct ArrayModRaw;
|
|
46
51
|
template<class T> struct ArrayModList;
|
|
47
52
|
struct SpecialArray;
|
|
53
|
+
struct SparseVector;
|
|
54
|
+
struct SparseMatrix;
|
|
55
|
+
struct RowShifted;
|
|
48
56
|
|
|
49
57
|
/** Simple array container to store arbitrary-dimensional arrays (tensors).
|
|
50
58
|
Can buffer more memory than necessary for faster
|
|
@@ -78,6 +86,7 @@ template<class T> struct Array {
|
|
|
78
86
|
explicit Array(uint D0, uint D1, uint D2);
|
|
79
87
|
Array(std::initializer_list<T> values);
|
|
80
88
|
Array(std::initializer_list<uint> dim, std::initializer_list<T> values);
|
|
89
|
+
explicit Array(const T* p, uint size, bool byReference);
|
|
81
90
|
virtual ~Array();
|
|
82
91
|
|
|
83
92
|
/// @name assignments
|
|
@@ -132,7 +141,6 @@ template<class T> struct Array {
|
|
|
132
141
|
Array<T>& resizeAs(const Array<T>& a);
|
|
133
142
|
Array<T>& reshapeAs(const Array<T>& a);
|
|
134
143
|
Array<T>& resizeCopyAs(const Array<T>& a);
|
|
135
|
-
Array<T>& reshapeFlat();
|
|
136
144
|
Array<T>& dereference();
|
|
137
145
|
|
|
138
146
|
/// @name dimensionality access
|
|
@@ -142,7 +150,7 @@ template<class T> struct Array {
|
|
|
142
150
|
/// @name initializing/assigning entries
|
|
143
151
|
Array<T>& clear();
|
|
144
152
|
Array<T>& setZero(byte zero=0);
|
|
145
|
-
void
|
|
153
|
+
void setConst(const T& scalar, int d=-1);
|
|
146
154
|
void setId(int d=-1);
|
|
147
155
|
void setDiag(const T& scalar, int d=-1);
|
|
148
156
|
void setDiag(const Array<T>& vector);
|
|
@@ -159,14 +167,13 @@ template<class T> struct Array {
|
|
|
159
167
|
Array<T>& setCarray(const T** buffer, uint D0, uint D1);
|
|
160
168
|
Array<T>& referTo(const T* buffer, uint n);
|
|
161
169
|
void referTo(const Array<T>& a);
|
|
162
|
-
void referToRange(const Array<T>& a, int
|
|
163
|
-
void referToRange(const Array<T>& a, int i,
|
|
164
|
-
void referToRange(const Array<T>& a, int i, int j,
|
|
170
|
+
void referToRange(const Array<T>& a, std::pair<int, int> I);
|
|
171
|
+
void referToRange(const Array<T>& a, int i, std::pair<int, int> J);
|
|
172
|
+
void referToRange(const Array<T>& a, int i, int j, std::pair<int, int> K);
|
|
165
173
|
void referToDim(const Array<T>& a, int i);
|
|
166
174
|
void referToDim(const Array<T>& a, uint i, uint j);
|
|
167
175
|
void referToDim(const Array<T>& a, uint i, uint j, uint k);
|
|
168
176
|
void takeOver(Array<T>& a); //a is cleared (earlier: becomes a reference to its previously owned memory)
|
|
169
|
-
Array<T>& setGrid(uint dim, T lo, T hi, uint steps);
|
|
170
177
|
|
|
171
178
|
/// @name access by reference (direct memory access)
|
|
172
179
|
Array<T> ref() const; //a reference on this
|
|
@@ -191,11 +198,11 @@ template<class T> struct Array {
|
|
|
191
198
|
|
|
192
199
|
/// @name access by copy
|
|
193
200
|
Array<T> copy() const;
|
|
194
|
-
Array<T> sub(int
|
|
195
|
-
Array<T> sub(int
|
|
196
|
-
Array<T> sub(int
|
|
197
|
-
Array<T>
|
|
198
|
-
Array<T>
|
|
201
|
+
Array<T> sub(std::pair<int, int> I) const;
|
|
202
|
+
Array<T> sub(std::pair<int, int> I, std::pair<int, int> J) const;
|
|
203
|
+
Array<T> sub(std::pair<int, int> I, std::pair<int, int> J, std::pair<int, int> K) const;
|
|
204
|
+
Array<T> pick(std::pair<int, int> I, Array<uint> cols) const;
|
|
205
|
+
Array<T> pick(Array<uint> elems) const;
|
|
199
206
|
Array<T> row(uint row_index) const;
|
|
200
207
|
Array<T> rows(uint start_row, uint end_row) const;
|
|
201
208
|
Array<T> col(uint col_index) const;
|
|
@@ -225,7 +232,7 @@ template<class T> struct Array {
|
|
|
225
232
|
void delRows(int i, uint k=1);
|
|
226
233
|
void delColumns(int i, uint k=1);
|
|
227
234
|
void insRows(int i, uint k=1);
|
|
228
|
-
|
|
235
|
+
Array<T>& insColumns(int i, uint k=1);
|
|
229
236
|
void resizeDim(uint k, uint dk);
|
|
230
237
|
void setAppend(const T& x); //? same as if(findValue(x)==-1) append(x)
|
|
231
238
|
void setAppend(const Array<T>& x);
|
|
@@ -256,6 +263,22 @@ template<class T> struct Array {
|
|
|
256
263
|
void permuteRandomly();
|
|
257
264
|
void shift(int offset, bool wrapAround=true);
|
|
258
265
|
|
|
266
|
+
/// @name special matrices -- only for double
|
|
267
|
+
double sparsity();
|
|
268
|
+
SparseMatrix& sparse();
|
|
269
|
+
const SparseMatrix& sparse() const;
|
|
270
|
+
SparseVector& sparseVec();
|
|
271
|
+
const SparseVector& sparseVec() const;
|
|
272
|
+
RowShifted& rowShifted();
|
|
273
|
+
const RowShifted& rowShifted() const;
|
|
274
|
+
|
|
275
|
+
/// @name attached Jacobian -- only for double
|
|
276
|
+
std::unique_ptr<Array<double>> jac=0; ///< optional pointer to Jacobian, to enable autodiff
|
|
277
|
+
void J_setId();
|
|
278
|
+
Array<double>& J();
|
|
279
|
+
Array<double> noJ() const;
|
|
280
|
+
Array<double> J_reset();
|
|
281
|
+
|
|
259
282
|
/// @name I/O
|
|
260
283
|
void write(std::ostream& os=std::cout, const char* ELEMSEP=nullptr, const char* LINESEP=nullptr, const char* BRACKETS=nullptr, bool dimTag=false, bool binary=false) const;
|
|
261
284
|
Array<T>& read(std::istream& is);
|
|
@@ -299,33 +322,14 @@ template<class T> bool operator==(const Array<T>& v, const Array<T>& w); //equal
|
|
|
299
322
|
template<class T> Array<byte> operator==(const Array<T>& v, const T& w); //element-wise equal
|
|
300
323
|
template<class T> bool operator!=(const Array<T>& v, const Array<T>& w);
|
|
301
324
|
template<class T> std::istream& operator>>(std::istream& is, Array<T>& x);
|
|
302
|
-
template<class T> Array<T>& operator>>(Array<T>& x, std::istream& is);
|
|
303
325
|
template<class T> std::ostream& operator<<(std::ostream& os, const Array<T>& x);
|
|
304
326
|
|
|
305
|
-
template<class T> void operator+=(Array<T>& x, const Array<T>& y)
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
template<class T> void operator+=(Array<T>& x, const T& y) {
|
|
312
|
-
T* xp=x.p, *xstop=xp+x.N;
|
|
313
|
-
for(; xp!=xstop; xp++) *xp += y;
|
|
314
|
-
}
|
|
315
|
-
template<class T> void operator-=(Array<T>& x, const Array<T>& y) {
|
|
316
|
-
CHECK_EQ(x.N, y.N, "update operator on different array dimensions (" <<x.N <<", " <<y.N <<")");
|
|
317
|
-
T* xp=x.p, *xstop=xp+x.N;
|
|
318
|
-
const T* yp=y.p;
|
|
319
|
-
for(; xp!=xstop; xp++, yp++) *xp -= *yp;
|
|
320
|
-
}
|
|
321
|
-
template<class T> void operator-=(Array<T>& x, const T& y) {
|
|
322
|
-
T* xp=x.p, *xstop=xp+x.N;
|
|
323
|
-
for(; xp!=xstop; xp++) *xp -= y;
|
|
324
|
-
}
|
|
325
|
-
template<class T> void operator*=(Array<T>& x, const T& y) {
|
|
326
|
-
T* xp=x.p, *xstop=xp+x.N;
|
|
327
|
-
for(; xp!=xstop; xp++) *xp *= y;
|
|
328
|
-
}
|
|
327
|
+
template<class T> void operator+=(Array<T>& x, const Array<T>& y);
|
|
328
|
+
template<class T> void operator+=(Array<T>& x, const T& y);
|
|
329
|
+
template<class T> void operator-=(Array<T>& x, const Array<T>& y);
|
|
330
|
+
template<class T> void operator-=(Array<T>& x, const T& y);
|
|
331
|
+
template<class T> void operator*=(Array<T>& x, const T& y);
|
|
332
|
+
|
|
329
333
|
template<class T> Array<T> operator+(const Array<T>& y, const Array<T>& z) { Array<T> x(y); x+=z; return x; }
|
|
330
334
|
template<class T> Array<T> operator+(const Array<T>& y, T z) { Array<T> x(y); x+=z; return x; }
|
|
331
335
|
template<class T> Array<T> operator-(const Array<T>& y, const Array<T>& z) { Array<T> x(y); x-=z; return x; }
|
|
@@ -360,6 +364,7 @@ template <class T> std::ostream& operator<<(std::ostream& os, const ArrayModList
|
|
|
360
364
|
/// @name standard types
|
|
361
365
|
/// @{
|
|
362
366
|
|
|
367
|
+
typedef rai::Array<double> arr;
|
|
363
368
|
typedef rai::Array<uint> uintA;
|
|
364
369
|
typedef rai::Array<int> intA;
|
|
365
370
|
typedef rai::Array<char> charA;
|
|
@@ -373,6 +378,8 @@ typedef rai::Array<intA> intAA;
|
|
|
373
378
|
typedef rai::Array<uintA> uintAA;
|
|
374
379
|
|
|
375
380
|
namespace rai { struct String; }
|
|
381
|
+
typedef rai::Array<rai::String> strA;
|
|
382
|
+
typedef rai::Array<rai::String> strAA;
|
|
376
383
|
typedef rai::Array<rai::String> StringA;
|
|
377
384
|
typedef rai::Array<StringA> StringAA;
|
|
378
385
|
typedef rai::Array<rai::String*> StringL;
|
|
@@ -385,7 +392,7 @@ typedef rai::Array<rai::String*> StringL;
|
|
|
385
392
|
namespace rai {
|
|
386
393
|
|
|
387
394
|
/// return array of c's
|
|
388
|
-
template<class T> Array<T> consts(const T& c, const uintA& d) { Array<T> z; z.resize(d); z.
|
|
395
|
+
template<class T> Array<T> consts(const T& c, const uintA& d) { Array<T> z; z.resize(d); z.setConst(c); return z; }
|
|
389
396
|
/// return VECTOR of c's
|
|
390
397
|
template<class T> Array<T> consts(const T& c, uint n) { return consts(c, uintA{n}); }
|
|
391
398
|
/// return matrix of c's
|
|
@@ -410,6 +417,11 @@ template<class T> Array<Array<T>> getArrayArray(const Array<T>& data) {
|
|
|
410
417
|
return xx;
|
|
411
418
|
}
|
|
412
419
|
|
|
420
|
+
/** @brief return a `dim'-dimensional grid with `steps' intervals
|
|
421
|
+
filling the range [lo, hi] in each dimension. Note: returned array is
|
|
422
|
+
`flat', rather than grid-shaped. */
|
|
423
|
+
template<class T> Array<T> grid(uint dim, T lo, T hi, uint steps);
|
|
424
|
+
|
|
413
425
|
}
|
|
414
426
|
|
|
415
427
|
//===========================================================================
|
|
@@ -526,8 +538,7 @@ template<class T> Array<T> setSectionSorted(const Array<T>& x, const Array<T>& y
|
|
|
526
538
|
return R;
|
|
527
539
|
}
|
|
528
540
|
|
|
529
|
-
template<class T>
|
|
530
|
-
void setMinusSorted(Array<T>& x, const Array<T>& y, bool (*comp)(const T& a, const T& b)) {
|
|
541
|
+
template<class T> void setMinusSorted(Array<T>& x, const Array<T>& y, bool (*comp)(const T& a, const T& b)) {
|
|
531
542
|
#if 1
|
|
532
543
|
int i=x.N-1, j=y.N-1;
|
|
533
544
|
if(j<0) return;
|
|
@@ -687,6 +698,19 @@ void b64_encode(char* code, int code_len, const char* data, int data_len);
|
|
|
687
698
|
void b64_decode(char* data, int data_len, const char* code, int code_len);
|
|
688
699
|
}
|
|
689
700
|
|
|
701
|
+
//===========================================================================
|
|
702
|
+
//
|
|
703
|
+
// conversions
|
|
704
|
+
//
|
|
705
|
+
|
|
706
|
+
template<class T> rai::Array<T> as_arr(const std::vector<T>& a, bool byReference) {
|
|
707
|
+
return rai::Array<T>(&a.front(), a.size(), byReference);
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
template<class T> std::vector<T> as_vector(const rai::Array<T>& a) {
|
|
711
|
+
return std::vector<T>(a.p, a.p+a.N);
|
|
712
|
+
}
|
|
713
|
+
|
|
690
714
|
//===========================================================================
|
|
691
715
|
//
|
|
692
716
|
// implementations
|