├── README.md
├── assets
├── control_panel.png
└── rqt_free_gait_interface.png
├── balance_controller
├── CMakeLists.txt
├── config
│ ├── control.yaml
│ ├── controller_gains.yaml
│ ├── controller_gains_gazebo.yaml
│ └── free_gait_control.perspective
├── controller_plugin_descriptions.xml
├── include
│ ├── balance_controller
│ │ ├── contact_force_distribution
│ │ │ ├── ContactForceDistribution.hpp
│ │ │ └── ContactForceDistributionBase.hpp
│ │ ├── math.hpp
│ │ ├── motion_control
│ │ │ ├── MotionControllerBase.hpp
│ │ │ └── VirtualModelController.hpp
│ │ └── ros_controler
│ │ │ ├── forward_command_interface.hpp
│ │ │ ├── gazebo_state_hardware_interface.hpp
│ │ │ ├── joint_torque_controller.hpp
│ │ │ ├── joint_torque_controller.hpp.gch
│ │ │ ├── robot_state_gazebo_ros_control_plugin.hpp
│ │ │ ├── robot_state_gazebo_ros_control_plugin.hpp.gch
│ │ │ ├── robot_state_interface.hpp
│ │ │ ├── ros_balance_controller.hpp
│ │ │ ├── single_leg_controller.hpp
│ │ │ └── state_estimate_controller.hpp
│ └── state_switcher
│ │ ├── StateSwitcher.hpp
│ │ └── StateSwitcherBase.hpp
├── launch
│ ├── balance_controller_manager.launch
│ ├── balance_controller_manager_setcap.launch
│ ├── rqt_interface.launch
│ └── setcap.sh
├── package.xml
├── plugin_descriptions.xml
├── src
│ ├── contact_force_distribution
│ │ ├── ContactForceDistribution.cpp
│ │ └── ContactForceDistributionBase.cpp
│ ├── motion_control
│ │ ├── MotionControllerBase.cpp
│ │ └── VirtualModelController.cpp
│ ├── ros_controller
│ │ ├── balance_controller_manager.cpp
│ │ ├── gazebo_state_hardware_interface.cpp
│ │ ├── joint_torque_controller.cpp
│ │ ├── robot_state_gazebo_ros_control_plugin.cpp
│ │ ├── ros_balance_controller.cpp
│ │ ├── single_leg_controller.cpp
│ │ └── state_estimate_controller.cpp
│ └── state_switcher
│ │ ├── StateSwitcher.cpp
│ │ └── StateSwitcherBase.cpp
└── test
│ ├── test.cpp
│ ├── test_balance_controller.cpp
│ └── virtual_model_controller_test.cpp
├── control_panel
├── CMakeLists.txt
├── include
│ └── rqt_control_panel_plugin
│ │ ├── rqt_control_panel_plugin.h
│ │ └── rqt_control_panel_plugin_widget.h
├── package.xml
├── plugin.xml
├── src
│ └── rqt_control_panel_plugin
│ │ ├── rqt_control_panel_plugin.cpp
│ │ └── rqt_control_panel_plugin_widget.cpp
└── ui
│ └── rqt_control_panel_plugin
│ └── rqt_control_panel_plugin_widget.ui
├── doxygen
└── Doxyfile
├── free_gait_action_loader
├── CHANGELOG.rst
├── CMakeLists.txt
├── actions
│ └── test.yaml
├── bin
│ └── free_gait_action_loader
│ │ └── action_loader.py
├── package.xml
├── setup.py
└── src
│ └── free_gait_action_loader
│ ├── __init__.py
│ ├── action_handling.py
│ ├── action_handling.pyc
│ ├── collection_handling.py
│ └── collection_handling.pyc
├── free_gait_core
├── CHANGELOG.rst
├── CMakeLists.txt
├── doc
│ ├── control_scheme.pdf
│ ├── control_scheme_preview.png
│ ├── motion_examples.jpg
│ ├── motion_examples_preview.jpg
│ ├── notions_and_coordinate_systems.pdf
│ └── notions_and_coordinate_systems_preview.png
├── include
│ └── free_gait_core
│ │ ├── TypeDefs.hpp
│ │ ├── TypePrints.hpp
│ │ ├── base_motion
│ │ ├── BaseAuto.hpp
│ │ ├── BaseMotionBase.hpp
│ │ ├── BaseTarget.hpp
│ │ ├── BaseTrajectory.hpp
│ │ └── base_motion.hpp
│ │ ├── executor
│ │ ├── AdapterBase.hpp
│ │ ├── BatchExecutor.hpp
│ │ ├── Executor.hpp
│ │ ├── ExecutorState.hpp
│ │ ├── State.hpp
│ │ ├── StateBatch.hpp
│ │ ├── StateBatchComputer.hpp
│ │ ├── executor.hpp
│ │ └── executor.hpp.gch
│ │ ├── free_gait_core.hpp
│ │ ├── leg_motion
│ │ ├── EndEffectorMotionBase.hpp
│ │ ├── EndEffectorTarget.hpp
│ │ ├── EndEffectorTrajectory.hpp
│ │ ├── Footstep.hpp
│ │ ├── JointMotionBase.hpp
│ │ ├── JointTrajectory.hpp
│ │ ├── LegMode.hpp
│ │ ├── LegMotionBase.hpp
│ │ └── leg_motion.hpp
│ │ ├── pose_optimization
│ │ ├── PoseConstraintsChecker.hpp
│ │ ├── PoseOptimizationBase.hpp
│ │ ├── PoseOptimizationFunctionConstraints.hpp
│ │ ├── PoseOptimizationGeometric.hpp
│ │ ├── PoseOptimizationObjectiveFunction.hpp
│ │ ├── PoseOptimizationProblem.hpp
│ │ ├── PoseOptimizationQP.hpp
│ │ ├── PoseOptimizationSQP.hpp
│ │ ├── PoseParameterization.hpp
│ │ ├── pose_optimization.hpp
│ │ └── poseparameterization.h
│ │ └── step
│ │ ├── CustomCommand.hpp
│ │ ├── Step.hpp
│ │ ├── StepCompleter.hpp
│ │ ├── StepComputer.hpp
│ │ ├── StepParameters.hpp
│ │ ├── StepQueue.hpp
│ │ └── step.hpp
├── package.xml
├── plugin_description.xml
├── src
│ ├── TypeDefs.cpp
│ ├── TypePrints.cpp
│ ├── base_motion
│ │ ├── BaseAuto.cpp
│ │ ├── BaseMotionBase.cpp
│ │ ├── BaseTarget.cpp
│ │ └── BaseTrajectory.cpp
│ ├── executor
│ │ ├── AdapterBase.cpp
│ │ ├── BatchExecutor.cpp
│ │ ├── Executor.cpp
│ │ ├── ExecutorState.cpp
│ │ ├── State.cpp
│ │ ├── StateBatch.cpp
│ │ └── StateBatchComputer.cpp
│ ├── leg_motion
│ │ ├── EndEffectorMotionBase.cpp
│ │ ├── EndEffectorTarget.cpp
│ │ ├── EndEffectorTrajectory.cpp
│ │ ├── Footstep.cpp
│ │ ├── JointMotionBase.cpp
│ │ ├── JointTrajectory.cpp
│ │ ├── LegMode.cpp
│ │ └── LegMotionBase.cpp
│ ├── pose_optimization
│ │ ├── PoseConstraintsChecker.cpp
│ │ ├── PoseOptimizationBase.cpp
│ │ ├── PoseOptimizationFunctionConstraints.cpp
│ │ ├── PoseOptimizationGeometric.cpp
│ │ ├── PoseOptimizationObjectiveFunction.cpp
│ │ ├── PoseOptimizationProblem.cpp
│ │ ├── PoseOptimizationQP.cpp
│ │ ├── PoseOptimizationSQP.cpp
│ │ ├── PoseParameterization.cpp
│ │ └── poseparameterization.cpp
│ └── step
│ │ ├── CustomCommand.cpp
│ │ ├── Step.cpp
│ │ ├── StepCompleter.cpp
│ │ ├── StepComputer.cpp
│ │ └── StepQueue.cpp
└── test
│ ├── AdapterDummy.cpp
│ ├── AdapterDummy.hpp
│ ├── FootstepTest.cpp
│ ├── PoseOptimizationQpTest.cpp
│ ├── PoseOptimizationSQPTest.cpp
│ ├── StepTest.cpp
│ └── test_free_gait_core.cpp
├── free_gait_marker
├── CHANGELOG.rst
├── CMakeLists.txt
├── config
│ └── locomotion_controller.yaml
├── include
│ └── free_gait_marker
│ │ ├── marker_manager
│ │ └── MarkerManager.hpp
│ │ └── markers
│ │ ├── MarkerFoot.hpp
│ │ └── MarkerKnot.hpp
├── launch
│ └── free_gait_marker.launch
├── package.xml
└── src
│ ├── free_gait_marker_node.cpp
│ ├── marker_manager
│ └── MarkerManager.cpp
│ └── markers
│ ├── MarkerFoot.cpp
│ └── MarkerKnot.cpp
├── free_gait_msgs
├── CHANGELOG.rst
├── CMakeLists.txt
├── action
│ ├── ExecuteAction.action
│ └── ExecuteSteps.action
├── msg
│ ├── ActionDescription.msg
│ ├── BaseAuto.msg
│ ├── BaseTarget.msg
│ ├── BaseTrajectory.msg
│ ├── CollectionDescription.msg
│ ├── CustomCommand.msg
│ ├── EndEffectorTarget.msg
│ ├── EndEffectorTrajectory.msg
│ ├── Footstep.msg
│ ├── JointTarget.msg
│ ├── JointTrajectory.msg
│ ├── LegMode.msg
│ ├── RobotState.msg
│ └── Step.msg
├── package.xml
└── srv
│ ├── GetActions.srv
│ ├── GetCollections.srv
│ ├── SendAction.srv
│ ├── SendActionSequence.srv
│ └── SetLimbConfigure.srv
├── free_gait_python
├── CHANGELOG.rst
├── CMakeLists.txt
├── package.xml
├── setup.py
└── src
│ └── free_gait
│ ├── __init__.py
│ ├── action.py
│ ├── action.pyc
│ ├── free_gait.py
│ └── free_gait.pyc
├── free_gait_ros
├── CHANGELOG.rst
├── CMakeLists.txt
├── include
│ └── free_gait_ros
│ │ ├── AdapterDummy.hpp
│ │ ├── AdapterGazebo.hpp
│ │ ├── AdapterGazebo.hpp.gch
│ │ ├── AdapterRos.hpp
│ │ ├── AdapterRosInterfaceBase.hpp
│ │ ├── AdapterRosInterfaceDummy.hpp
│ │ ├── AdapterRosInterfaceGazebo.hpp
│ │ ├── AdapterRosInterfaceGazebo.hpp.gch
│ │ ├── FootstepOptimization.hpp
│ │ ├── FootstepOptimization.hpp.gch
│ │ ├── FreeGaitActionClient.hpp
│ │ ├── FreeGaitActionServer.hpp
│ │ ├── RosVisualization.hpp
│ │ ├── StateRosPublisher.hpp
│ │ ├── StepFrameConverter.hpp
│ │ ├── StepRosConverter.hpp
│ │ ├── free_gait_ros.hpp
│ │ ├── gait_generate_client.hpp
│ │ └── message_traits.hpp
├── launch
│ └── test.launch
├── package.xml
├── plugin_description.xml
├── src
│ ├── AdapterDummy.cpp
│ ├── AdapterGazebo.cpp
│ ├── AdapterRos.cpp
│ ├── AdapterRosInterfaceBase.cpp
│ ├── AdapterRosInterfaceDummy.cpp
│ ├── AdapterRosInterfaceGazebo.cpp
│ ├── FreeGaitActionClient.cpp
│ ├── FreeGaitActionServer.cpp
│ ├── RosVisualization.cpp
│ ├── StateRosPublisher.cpp
│ ├── StepFrameConverter.cpp
│ └── StepRosConverter.cpp
└── test
│ ├── AdapterDummy.cpp
│ ├── AdapterDummy.hpp
│ ├── FootstepOptimization.cpp
│ ├── StepTest.cpp
│ ├── action_client_test.cpp
│ ├── action_server_test.cpp
│ ├── gait_generate_client.cpp
│ ├── robotStatePublisher.cpp
│ ├── test.cpp
│ ├── test_foothold_optimization.cpp
│ └── test_free_gait_ros.cpp
├── free_gait_rviz_plugin
├── CHANGELOG.rst
├── CMakeLists.txt
├── icons
│ └── classes
│ │ └── FreeGaitPreview.png
├── include
│ └── free_gait_rviz_plugin
│ │ ├── FreeGaitPreviewDisplay.hpp
│ │ ├── FreeGaitPreviewPlayback.hpp
│ │ └── FreeGaitPreviewVisual.hpp
├── package.xml
├── plugin_description.xml
├── src
│ ├── FreeGaitPreviewDisplay.cpp
│ ├── FreeGaitPreviewPlayback.cpp
│ ├── FreeGaitPreviewVisual.cpp
│ └── rviz
│ │ └── properties
│ │ ├── button_property.cpp
│ │ ├── button_property.h
│ │ ├── button_toggle_property.cpp
│ │ ├── button_toggle_property.h
│ │ ├── float_slider_property.cpp
│ │ ├── float_slider_property.h
│ │ ├── line_edit_with_slider.cpp
│ │ └── line_edit_with_slider.h
└── test
│ └── class_load_test.cpp
├── my_actions
├── CMakeLists.txt
├── actions
│ └── test.yaml
├── collections
│ └── test_collections.yaml
├── motion_scripts
│ ├── WorkerThreadSendAction.h
│ ├── base_rotate_pitch.yaml
│ ├── base_rotate_roll.yaml
│ ├── base_rotate_yaw.yaml
│ ├── base_rotate_yaw_pitch.yaml
│ ├── base_target_demo.yaml
│ ├── change_to_spot.yaml
│ ├── end_effectors_target_demo.yaml
│ ├── leg_move.yaml
│ ├── pace_gazebo.yaml
│ ├── sitdown.yaml
│ ├── standup.yaml
│ ├── stational_walk.yaml
│ └── trot_test.yaml
└── package.xml
├── qp_solver
├── CMakeLists.txt
├── include
│ └── qp_solver
│ │ ├── QuadProg++.h
│ │ ├── pose_optimization
│ │ ├── PoseConstraintsChecker.hpp
│ │ ├── PoseOptimizationBase.hpp
│ │ ├── PoseOptimizationFunctionConstraints.hpp
│ │ ├── PoseOptimizationGeometric.hpp
│ │ ├── PoseOptimizationObjectiveFunction.hpp
│ │ ├── PoseOptimizationProblem.hpp
│ │ ├── PoseOptimizationQP.hpp
│ │ ├── PoseOptimizationSQP.hpp
│ │ ├── pose_optimization.hpp
│ │ └── poseparameterization.h
│ │ ├── qp_array.h
│ │ ├── quadraticproblemsolver.h
│ │ └── sequencequadraticproblemsolver.h
├── package.xml
├── src
│ ├── AdapterBase.cpp
│ ├── Array.cc
│ ├── QuadProg++.cc
│ ├── State.cpp
│ ├── TypeDefs.cpp
│ ├── main.cc
│ ├── pose_optimization
│ │ ├── PoseConstraintsChecker.cpp
│ │ ├── PoseOptimizationBase.cpp
│ │ ├── PoseOptimizationFunctionConstraints.cpp
│ │ ├── PoseOptimizationGeometric.cpp
│ │ ├── PoseOptimizationObjectiveFunction.cpp
│ │ ├── PoseOptimizationProblem.cpp
│ │ ├── PoseOptimizationQP.cpp
│ │ ├── PoseOptimizationSQP.cpp
│ │ └── poseparameterization.cpp
│ ├── qp_solve_test.cpp
│ ├── quadraticproblemsolver.cpp
│ └── sequencequadraticproblemsolver.cpp
└── test
│ ├── AdapterDummy.cpp
│ ├── AdapterDummy.hpp
│ ├── FootstepTest.cpp
│ ├── PoseOptimizationQpTest.cpp
│ ├── PoseOptimizationSQPTest.cpp
│ ├── StepTest.cpp
│ └── test_free_gait_core.cpp
├── quadruped_model
├── CMakeLists.txt
├── include
│ └── quadruped_model
│ │ ├── QuadrupedModel.hpp
│ │ ├── common
│ │ └── typedefs.hpp
│ │ ├── quadruped_state.h
│ │ └── quadrupedkinematics.h
├── package.xml
├── src
│ ├── QuadrupedModel.cpp
│ ├── kinematicsTest.cpp
│ ├── quadruped_state.cpp
│ └── quadrupedkinematics.cpp
└── urdf
│ ├── quadruped_model.urdf
│ ├── quadruped_model_lf_leg.urdf
│ ├── quadruped_model_lh_leg.urdf
│ ├── quadruped_model_rf_leg.urdf
│ ├── quadruped_model_rh_leg.urdf
│ ├── simple_humanoid.urdf
│ ├── simpledog.urdf
│ ├── simpledog_lf_leg.urdf
│ ├── simpledog_lh_leg.urdf
│ ├── simpledog_m.urdf
│ ├── simpledog_rbdl.urdf
│ ├── simpledog_rf_leg.urdf
│ └── simpledog_rh_leg.urdf
├── rqt_free_gait_action
├── CHANGELOG.rst
├── CMakeLists.txt
├── include
│ └── rqt_free_gait_action
│ │ ├── Action.h
│ │ ├── ActionModel.h
│ │ ├── Collection.h
│ │ ├── CollectionModel.h
│ │ ├── FavoritePushButton.h
│ │ ├── FreeGaitActionPlugin.h
│ │ ├── WorkerThreadGetCollections.h
│ │ ├── WorkerThreadSendAction.h
│ │ ├── WorkerThreadSendActionSequence.h
│ │ ├── WorkerThreadSwitchController.h
│ │ ├── WorkerThreadUpdateTrigger.h
│ │ └── workthreadsetbool.h
├── launch
│ └── rqt_free_gait_action.launch
├── package.xml
├── plugin.xml
├── resource
│ ├── FreeGaitActionPlugin.ui
│ ├── icons
│ │ ├── 16x16
│ │ │ └── refresh.svg
│ │ └── 22x22
│ │ │ └── refresh.svg
│ └── resources.qrc
├── scripts
│ └── rqt_free_gait_action
├── setup.py
└── src
│ └── rqt_free_gait_action
│ ├── Action.cpp
│ ├── ActionModel.cpp
│ ├── Collection.cpp
│ ├── CollectionModel.cpp
│ ├── FavoritePushButton.cpp
│ ├── FreeGaitActionPlugin.cpp
│ ├── WorkerThreadGetCollections.cpp
│ ├── WorkerThreadSendAction.cpp
│ ├── WorkerThreadSendActionSequence.cpp
│ ├── WorkerThreadSwitchController.cpp
│ ├── WorkerThreadUpdateTrigger.cpp
│ └── workerthreadsetbool.cpp
├── rqt_free_gait_monitor
├── CHANGELOG.rst
├── CMakeLists.txt
├── include
│ └── rqt_free_gait_monitor
│ │ ├── CircularBuffer.h
│ │ ├── ClickableLabel.h
│ │ ├── FreeGaitMonitorPlugin.h
│ │ ├── WorkerThreadPausePlay.h
│ │ └── WorkerThreadStop.h
├── launch
│ └── rqt_free_gait_monitor.launch
├── package.xml
├── plugin.xml
├── resource
│ ├── FreeGaitMonitorPlugin.ui
│ ├── icons
│ │ ├── 16x16
│ │ │ ├── collapse.svg
│ │ │ ├── delete.svg
│ │ │ ├── done.svg
│ │ │ ├── expand.svg
│ │ │ ├── failed.svg
│ │ │ ├── go-bottom.svg
│ │ │ ├── go-down.svg
│ │ │ ├── go-top.svg
│ │ │ ├── go-up.svg
│ │ │ ├── pause.svg
│ │ │ ├── play.svg
│ │ │ ├── stop.svg
│ │ │ ├── unknown.svg
│ │ │ └── warning.svg
│ │ └── 22x22
│ │ │ ├── done.svg
│ │ │ ├── failed.svg
│ │ │ ├── pause.svg
│ │ │ ├── play.svg
│ │ │ ├── stop.svg
│ │ │ ├── unknown.svg
│ │ │ └── warning.svg
│ └── resources.qrc
├── scripts
│ └── rqt_free_gait_monitor
├── setup.py
└── src
│ └── rqt_free_gait_monitor
│ ├── CircularBuffer.cpp
│ ├── ClickableLabel.cpp
│ ├── FreeGaitMonitorPlugin.cpp
│ ├── WorkerThreadPausePlay.cpp
│ └── WorkerThreadStop.cpp
└── single_leg_test
├── CMakeLists.txt
├── CMakeLists.txt.user
├── DataFloder
├── AccelerationofForward.txt
├── Forward_Dynamics.mp4
├── Forward_Dynamics_realsensordata.mp4
├── PlannedData.txt
├── PositionofForward.txt
├── TauofInversedynamics.txt
├── VelocityofForward.txt
├── rf_leg_fixed_base_real_sensor.mp4
├── rf_leg_fixed_base_whole_process.mp4
├── webotsaccelerationreal_real.txt
├── webotsacclerationreal.txt
├── webotsposition.txt
├── webotsposition_real.txt
├── webotstorque.txt
├── webotstorquereal.txt
├── webotstorquereal_real.txt
├── webotsvelocity.txt
└── webotsvelocity_real.txt
├── include
└── single_leg_test
│ ├── algorithm.hpp
│ ├── model_test_header.hpp
│ └── webotsheader_dynamics.hpp
├── lib
└── model_test_header.cpp
├── package.xml
├── src
└── dynamics.cpp
└── test
├── example.cc
├── model_test.cpp
└── test.cpp
/assets/control_panel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ShunyaoWang/quadruped_locomotion/fddfafba2c217ad0412d7045d1bb579ce034744b/assets/control_panel.png
--------------------------------------------------------------------------------
/assets/rqt_free_gait_interface.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ShunyaoWang/quadruped_locomotion/fddfafba2c217ad0412d7045d1bb579ce034744b/assets/rqt_free_gait_interface.png
--------------------------------------------------------------------------------
/balance_controller/config/controller_gains.yaml:
--------------------------------------------------------------------------------
1 | balance_controller:
2 | virtual_model_controller:
3 | heading:
4 | kp: 5000
5 | kd: 5000
6 | kff: 10
7 | lateral:
8 | kp: 5000
9 | kd: 4000
10 | kff: 10
11 | vertical:
12 | kp: 10000
13 | kd: 5000
14 | kff: 100
15 | roll:
16 | kp: 10000
17 | kd: 1000
18 | kff: 0.2
19 | pitch:
20 | kp: 10000
21 | kd: 1000
22 | kff: 0.2
23 | yaw:
24 | kp: 4000
25 | kd: 1000
26 | kff: 1000
27 | contact_force_distribution:
28 | weights:
29 | force:
30 | heading: 1
31 | lateral: 5
32 | vertical: 1
33 | torque:
34 | roll: 10
35 | pitch: 10
36 | yaw: 5
37 | regularizer:
38 | value: 0.0001
39 | constraints:
40 | friction_coefficient: 0.6
41 | minimal_normal_force: 10
42 | single_leg_controller:
43 | x_direction:
44 | kp: 300
45 | kd: 20
46 | y_direction:
47 | kp: 300
48 | kd: 20
49 | z_direction:
50 | kp: 300
51 | kd: 20
52 |
--------------------------------------------------------------------------------
/balance_controller/config/controller_gains_gazebo.yaml:
--------------------------------------------------------------------------------
1 | balance_controller:
2 | virtual_model_controller:
3 | heading:
4 | kp: 5000
5 | kd: 5000
6 | kff: 10
7 | lateral:
8 | kp: 5000
9 | kd: 4000
10 | kff: 10
11 | vertical:
12 | kp: 10000
13 | kd: 5000
14 | kff: 100
15 | roll:
16 | kp: 10000
17 | kd: 1000
18 | kff: 0.2
19 | pitch:
20 | kp: 10000
21 | kd: 1000
22 | kff: 0.2
23 | yaw:
24 | kp: 4000
25 | kd: 1000
26 | kff: 1000
27 | contact_force_distribution:
28 | weights:
29 | force:
30 | heading: 1
31 | lateral: 5
32 | vertical: 1
33 | torque:
34 | roll: 10
35 | pitch: 10
36 | yaw: 5
37 | regularizer:
38 | value: 0.0001
39 | constraints:
40 | friction_coefficient: 0.6
41 | minimal_normal_force: 10
42 | single_leg_controller:
43 | x_direction:
44 | kp: 1000
45 | kd: 200
46 | y_direction:
47 | kp: 1000
48 | kd: 200
49 | z_direction:
50 | kp: 1000
51 | kd: 200
52 |
--------------------------------------------------------------------------------
/balance_controller/controller_plugin_descriptions.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 | A gazebo interface with robot state .
7 |
8 |
9 |
10 |
11 |
14 | A state estimate controller.
15 |
16 |
17 |
18 |
19 |
22 | A single leg controller.
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/balance_controller/include/balance_controller/ros_controler/joint_torque_controller.hpp.gch:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ShunyaoWang/quadruped_locomotion/fddfafba2c217ad0412d7045d1bb579ce034744b/balance_controller/include/balance_controller/ros_controler/joint_torque_controller.hpp.gch
--------------------------------------------------------------------------------
/balance_controller/include/balance_controller/ros_controler/robot_state_gazebo_ros_control_plugin.hpp.gch:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ShunyaoWang/quadruped_locomotion/fddfafba2c217ad0412d7045d1bb579ce034744b/balance_controller/include/balance_controller/ros_controler/robot_state_gazebo_ros_control_plugin.hpp.gch
--------------------------------------------------------------------------------
/balance_controller/include/balance_controller/ros_controler/state_estimate_controller.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * state_estimate_controller.hpp
3 | * Descriotion:
4 | *
5 | * Created on: Jul, 7, 2019
6 | * Author: Shunyao Wang
7 | * Institute: Harbin Institute of Technology, Shenzhen
8 | */
9 | #pragma once
10 |
11 | #include "controller_interface/controller.h"
12 | #include "balance_controller/ros_controler/robot_state_interface.hpp"
13 | #include
14 |
15 | #include "free_gait_core/free_gait_core.hpp"
16 | #include "sim_assiants/FootContacts.h"
17 | #include "sensor_msgs/Imu.h"
18 |
19 | #include "urdf/model.h"
20 |
21 | namespace balance_controller {
22 | class StateEstimateController : public controller_interface::Controller
23 | {
24 | typedef std::unordered_map LimbFlag;
25 | public:
26 | StateEstimateController();
27 | ~StateEstimateController();
28 |
29 | /**
30 | * @brief init
31 | * @param hardware
32 | * @param node_handle
33 | * @return
34 | */
35 | bool init(hardware_interface::RobotStateInterface* hardware,
36 | ros::NodeHandle& node_handle);
37 | void update(const ros::Time& time, const ros::Duration& period);
38 | void starting(const ros::Time& time);
39 | void stopping(const ros::Time& time);
40 |
41 | /**
42 | * @brief joint_names
43 | */
44 | std::vector joint_names;
45 | /**
46 | * @brief joints, a vector of joint handle, handle the joint of hardware
47 | * interface
48 | */
49 | std::vector joints;
50 | // std::vector joints;
51 | /**
52 | * @brief robot_state_handle, handle robot state
53 | */
54 | hardware_interface::RobotStateHandle robot_state_handle;
55 |
56 | unsigned int n_joints;
57 |
58 | private:
59 | ros::Subscriber contact_sub_, imu_sub_;
60 |
61 | LimbFlag real_contact_;
62 | std::vector limbs_;
63 |
64 | void footContactsCallback(const sim_assiants::FootContactsConstPtr& foot_contacts);
65 | void IMUmsgCallback(const sensor_msgs::ImuConstPtr& imu_msg);
66 |
67 | };
68 |
69 | }
70 |
--------------------------------------------------------------------------------
/balance_controller/include/state_switcher/StateSwitcherBase.hpp:
--------------------------------------------------------------------------------
1 | /*******************************************************************************************
2 | * Software License Agreement (BSD License)
3 | *
4 | * Copyright (c) 2014, C. Dario Bellicoso, Christian Gehring, Péter Fankhauser, Stelian Coros
5 | * All rights reserved.
6 | *
7 | * Redistribution and use in source and binary forms, with or without
8 | * modification, are permitted provided that the following conditions
9 | * are met:
10 | *
11 | * * Redistributions of source code must retain the above copyright
12 | * notice, this list of conditions and the following disclaimer.
13 | * * Redistributions in binary form must reproduce the above
14 | * copyright notice, this list of conditions and the following
15 | * disclaimer in the documentation and/or other materials provided
16 | * with the distribution.
17 | * * Neither the name of Autonomous Systems Lab nor ETH Zurich
18 | * nor the names of its contributors may be used to endorse or
19 | * promote products derived from this software without specific
20 | * prior written permission.
21 | *
22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
25 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
26 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
27 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
28 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
30 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
32 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33 | * POSSIBILITY OF SUCH DAMAGE.
34 | */
35 | /*
36 | * StateSwitcherBase.hpp
37 | *
38 | * Created on: Oct 5, 2014
39 | * Author: C. Dario Bellicoso
40 | */
41 |
42 | #ifndef LOCO_STATESWITCHERBASE_HPP_
43 | #define LOCO_STATESWITCHERBASE_HPP_
44 |
45 |
46 | namespace balance_controller {
47 |
48 | class StateSwitcherBase {
49 | public:
50 |
51 | StateSwitcherBase();
52 | virtual ~StateSwitcherBase();
53 |
54 | virtual bool initialize(double dt) = 0;
55 |
56 | };
57 |
58 | } /* namespace loco */
59 |
60 |
61 | #endif /* LOCO_STATESWITCHERBASE_HPP_ */
62 |
--------------------------------------------------------------------------------
/balance_controller/launch/balance_controller_manager_setcap.launch:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/balance_controller/launch/rqt_interface.launch:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/balance_controller/launch/setcap.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Setcap does not support symbolic links, so a potential symbolic link has to be resolved first.
4 | resolved_symlink=$(readlink -f ${5})
5 |
6 | # Setcap using password.
7 | echo ${4} | sudo -S setcap cap_net_raw+ep ${resolved_symlink}
8 |
9 | # Update the links and cache to the shared catkin libraries.
10 | # See https://stackoverflow.com/questions/9843178/linux-capabilities-setcap-seems-to-disable-ld-library-path
11 | sudo ldconfig /opt/ros/$ROS_DISTRO/lib
12 |
13 | # Launch the node.
14 | roslaunch roslaunch balance_controller balance_controller_manager.launch output:="${1}" launch_prefix:="${2}" time_step:="${3}"
15 |
--------------------------------------------------------------------------------
/balance_controller/plugin_descriptions.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 | A gazebo interface with robot state .
7 |
8 |
9 |
10 |
13 | A gazebo interface with robot state .
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/balance_controller/src/ros_controller/joint_torque_controller.cpp:
--------------------------------------------------------------------------------
1 | /*********************************************************************
2 | * Software License Agreement (BSD License)
3 | *
4 | * Copyright (c) 2008, Willow Garage, Inc.
5 | * Copyright (c) 2012, hiDOF, Inc.
6 | * Copyright (c) 2013, PAL Robotics, S.L.
7 | * Copyright (c) 2014, Fraunhofer IPA
8 | * All rights reserved.
9 | *
10 | * Redistribution and use in source and binary forms, with or without
11 | * modification, are permitted provided that the following conditions
12 | * are met:
13 | *
14 | * * Redistributions of source code must retain the above copyright
15 | * notice, this list of conditions and the following disclaimer.
16 | * * Redistributions in binary form must reproduce the above
17 | * copyright notice, this list of conditions and the following
18 | * disclaimer in the documentation and/or other materials provided
19 | * with the distribution.
20 | * * Neither the name of the Willow Garage nor the names of its
21 | * contributors may be used to endorse or promote products derived
22 | * from this software without specific prior written permission.
23 | *
24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
27 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
28 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
29 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
30 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
31 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
32 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
34 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35 | * POSSIBILITY OF SUCH DAMAGE.
36 | *********************************************************************/
37 |
38 | #include
39 | #include
40 |
41 | template
42 | void forward_command_controller::ForwardJointGroupCommandController::starting(const ros::Time& time)
43 | {
44 | // Start controller with 0.0 efforts
45 | commands_buffer_.readFromRT()->assign(n_joints_, 0.0);
46 | }
47 |
48 |
49 | PLUGINLIB_EXPORT_CLASS(balance_controller::JointTorqueController, controller_interface::ControllerBase)
50 |
--------------------------------------------------------------------------------
/balance_controller/src/state_switcher/StateSwitcherBase.cpp:
--------------------------------------------------------------------------------
1 | /*****************************************************************************************
2 | * Software License Agreement (BSD License)
3 | *
4 | * Copyright (c) 2014, C. Dario Bellicoso, Christian Gehring, Péter Fankhauser, Stelian Coros
5 | * All rights reserved.
6 | *
7 | * Redistribution and use in source and binary forms, with or without
8 | * modification, are permitted provided that the following conditions
9 | * are met:
10 | *
11 | * * Redistributions of source code must retain the above copyright
12 | * notice, this list of conditions and the following disclaimer.
13 | * * Redistributions in binary form must reproduce the above
14 | * copyright notice, this list of conditions and the following
15 | * disclaimer in the documentation and/or other materials provided
16 | * with the distribution.
17 | * * Neither the name of Autonomous Systems Lab nor ETH Zurich
18 | * nor the names of its contributors may be used to endorse or
19 | * promote products derived from this software without specific
20 | * prior written permission.
21 | *
22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
25 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
26 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
27 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
28 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
30 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
32 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33 | * POSSIBILITY OF SUCH DAMAGE.
34 | */
35 | /*
36 | * StateSwitcherBase.cpp
37 | *
38 | * Created on: Oct 5, 2014
39 | * Author: C. Dario Bellicoso
40 | */
41 |
42 | #include "state_switcher/StateSwitcherBase.hpp"
43 |
44 | namespace balance_controller {
45 |
46 |
47 | StateSwitcherBase::StateSwitcherBase() {
48 |
49 | }
50 |
51 |
52 | StateSwitcherBase::~StateSwitcherBase() {
53 |
54 | }
55 |
56 |
57 | } /* namespace loco */
58 |
--------------------------------------------------------------------------------
/balance_controller/test/test_balance_controller.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * filename.cpp
3 | * Descriotion: gtest
4 | *
5 | * Created on: Mar 15, 2019
6 | * Author: Shunyao Wang
7 | * Institute: Harbin Institute of Technology, Shenzhen
8 | */
9 | // gtest
10 | #include
11 | #include "ros/ros.h"
12 |
13 | // Run all the tests that were declared with TEST()
14 | int main(int argc, char **argv)
15 | {
16 |
17 | testing::InitGoogleTest(&argc, argv);
18 | ros::init(argc, argv, "test_balance_controller");
19 | ros::NodeHandle nh("~");
20 | srand((int)time(0));
21 | return RUN_ALL_TESTS();
22 | }
23 |
--------------------------------------------------------------------------------
/balance_controller/test/virtual_model_controller_test.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * filename.cpp
3 | * Descriotion:
4 | *
5 | * Created on: Mar 15, 2019
6 | * Author: Shunyao Wang
7 | * Institute: Harbin Institute of Technology, Shenzhen
8 | */
9 |
10 | // gtest
11 | #include
12 |
13 | #include "ros/ros.h"
14 |
15 | #include "free_gait_core/TypeDefs.hpp"
16 | #include "free_gait_core/free_gait_core.hpp"
17 | #include "balance_controller/contact_force_distribution/ContactForceDistributionBase.hpp"
18 | #include "balance_controller/contact_force_distribution/ContactForceDistribution.hpp"
19 | #include "balance_controller/motion_control/MotionControllerBase.hpp"
20 | #include "balance_controller/motion_control/VirtualModelController.hpp"
21 |
22 | TEST(virtual_model_controller, QPOptimization)
23 | {
24 | ros::NodeHandle nh("~");
25 | std::shared_ptr robot_state;
26 | robot_state.reset(new free_gait::State);
27 | kindr::EulerAnglesZyxPD rotation(0.5, 0.0, 0.0);
28 | robot_state->setPoseBaseToWorld(Pose(Position(0,0,0.4),RotationQuaternion(rotation)));
29 |
30 | auto CFD = std::shared_ptr(new balance_controller::ContactForceDistribution(nh, robot_state));
31 | ASSERT_TRUE(CFD->loadParameters());
32 | balance_controller::VirtualModelController VMC(nh, robot_state, CFD);
33 | ASSERT_TRUE(VMC.loadParameters());
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/control_panel/include/rqt_control_panel_plugin/rqt_control_panel_plugin.h:
--------------------------------------------------------------------------------
1 | #ifndef CONTROL_PANEL_PLUGIN
2 | #define CONTROL_PANEL_PLUGIN
3 |
4 | #include
5 | #include
6 |
7 | #include
8 |
9 | namespace rqt_control_panel_plugin {
10 |
11 | class control_panel_plugin : public rqt_gui_cpp::Plugin
12 | {
13 | public:
14 | control_panel_plugin();
15 |
16 | void initPlugin(qt_gui_cpp::PluginContext& context) override;
17 | void shutdownPlugin() override;
18 |
19 | void saveSettings(qt_gui_cpp::Settings& plugin_settings, qt_gui_cpp::Settings& instance_settings) const override;
20 | void restoreSettings(const qt_gui_cpp::Settings& plugin_settings, const qt_gui_cpp::Settings& instance_settings) override;
21 |
22 | private:
23 | rqt_control_panel_plugin_widget *widget = nullptr;
24 | };
25 |
26 | }
27 |
28 | #endif // CONTROL_PANEL_PLUGIN
29 |
30 |
--------------------------------------------------------------------------------
/control_panel/plugin.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | control panel for quadruped robot
4 |
5 |
6 |
7 | folder
8 | Plugins related to...
9 |
10 |
11 | control panel for quadruped robot
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/control_panel/src/rqt_control_panel_plugin/rqt_control_panel_plugin.cpp:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | #include
4 | #include
5 |
6 | namespace rqt_control_panel_plugin {
7 |
8 |
9 | control_panel_plugin::control_panel_plugin() :
10 | rqt_gui_cpp::Plugin()
11 | {
12 | setObjectName("control_panel_plugin");
13 | }
14 |
15 | void rqt_control_panel_plugin::control_panel_plugin::initPlugin(qt_gui_cpp::PluginContext &context)
16 | {
17 | widget = new rqt_control_panel_plugin_widget(getNodeHandle());
18 | context.addWidget(widget);
19 |
20 |
21 | }
22 |
23 | void rqt_control_panel_plugin::control_panel_plugin::shutdownPlugin()
24 | {
25 |
26 | }
27 |
28 | void rqt_control_panel_plugin::control_panel_plugin::saveSettings(qt_gui_cpp::Settings &plugin_settings, qt_gui_cpp::Settings &instance_settings) const
29 | {
30 |
31 | }
32 |
33 | void rqt_control_panel_plugin::control_panel_plugin::restoreSettings(const qt_gui_cpp::Settings &plugin_settings, const qt_gui_cpp::Settings &instance_settings)
34 | {
35 |
36 | }
37 |
38 | } // end namespace rqt_control_panel_plugin
39 |
40 | PLUGINLIB_EXPORT_CLASS(rqt_control_panel_plugin::control_panel_plugin, rqt_gui_cpp::Plugin)
41 |
--------------------------------------------------------------------------------
/free_gait_action_loader/CHANGELOG.rst:
--------------------------------------------------------------------------------
1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2 | Changelog for package free_gait_action_loader
3 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4 |
5 | Forthcoming
6 | -----------
7 |
8 | 0.1.1 (2017-01-31)
9 | ------------------
10 | * Initial release.
11 | * Contributors: Peter Fankhauser, Marko Bjelonic, Remo Diethelm
12 |
--------------------------------------------------------------------------------
/free_gait_action_loader/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # Project configuration
2 | cmake_minimum_required (VERSION 2.8)
3 | project(free_gait_action_loader)
4 |
5 | ## Find catkin macros and libraries
6 | ## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
7 | ## is used, also find other catkin packages
8 | find_package(catkin REQUIRED COMPONENTS
9 | rospy
10 | free_gait_python
11 | free_gait_msgs
12 | )
13 |
14 | catkin_package(
15 | #INCLUDE_DIRS
16 | #LIBRARIES
17 | #CATKIN_DEPENDS
18 | #DEPENDS
19 | )
20 |
21 | ## Uncomment this if the package has a setup.py. This macro ensures
22 | ## modules and global scripts declared therein get installed
23 | ## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html
24 | catkin_python_setup()
25 |
26 | #############
27 | ## Install ##
28 | #############
29 |
30 | # all install targets should use catkin DESTINATION variables
31 | # See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html
32 |
33 | ## Mark executable scripts (Python etc.) for installation
34 | ## in contrast to setup.py, you can choose the destination
35 | catkin_install_python(PROGRAMS
36 | bin/free_gait_action_loader/action_loader.py
37 | DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
38 | )
39 |
--------------------------------------------------------------------------------
/free_gait_action_loader/actions/test.yaml:
--------------------------------------------------------------------------------
1 | steps:
2 | - step:
3 | - base_auto:
4 |
--------------------------------------------------------------------------------
/free_gait_action_loader/package.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | free_gait_action_loader
4 | 0.3.0
5 | Dynamic loading of Free Gait actions.
6 | Peter Fankhauser
7 | Peter Fankhauser
8 | BSD
9 | https://github.com/leggedrobotics/free_gait
10 | https://github.com/leggedrobotics/free_gait/issues
11 |
12 | catkin
13 | rospy
14 | free_gait_python
15 | free_gait_msgs
16 |
17 |
18 |
--------------------------------------------------------------------------------
/free_gait_action_loader/setup.py:
--------------------------------------------------------------------------------
1 | from distutils.core import setup
2 | from catkin_pkg.python_setup import generate_distutils_setup
3 |
4 | d = generate_distutils_setup(
5 | packages=['free_gait_action_loader'],
6 | package_dir={'': 'src'}
7 | )
8 |
9 | setup(**d)
10 |
--------------------------------------------------------------------------------
/free_gait_action_loader/src/free_gait_action_loader/__init__.py:
--------------------------------------------------------------------------------
1 | from action_handling import ActionType
2 | from action_handling import ActionEntry
3 | from action_handling import ActionList
4 | from collection_handling import Collection
5 | from collection_handling import CollectionList
6 |
--------------------------------------------------------------------------------
/free_gait_action_loader/src/free_gait_action_loader/action_handling.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ShunyaoWang/quadruped_locomotion/fddfafba2c217ad0412d7045d1bb579ce034744b/free_gait_action_loader/src/free_gait_action_loader/action_handling.pyc
--------------------------------------------------------------------------------
/free_gait_action_loader/src/free_gait_action_loader/collection_handling.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ShunyaoWang/quadruped_locomotion/fddfafba2c217ad0412d7045d1bb579ce034744b/free_gait_action_loader/src/free_gait_action_loader/collection_handling.pyc
--------------------------------------------------------------------------------
/free_gait_core/CHANGELOG.rst:
--------------------------------------------------------------------------------
1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2 | Changelog for package free_gait_core
3 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4 |
5 | Forthcoming
6 | -----------
7 |
8 | 0.1.1 (2017-01-31)
9 | ------------------
10 | * Initial release.
11 | * Contributors: Peter Fankhauser, Dario Bellicoso, Remo Diethelm, Thomas Bi
12 |
--------------------------------------------------------------------------------
/free_gait_core/doc/control_scheme.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ShunyaoWang/quadruped_locomotion/fddfafba2c217ad0412d7045d1bb579ce034744b/free_gait_core/doc/control_scheme.pdf
--------------------------------------------------------------------------------
/free_gait_core/doc/control_scheme_preview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ShunyaoWang/quadruped_locomotion/fddfafba2c217ad0412d7045d1bb579ce034744b/free_gait_core/doc/control_scheme_preview.png
--------------------------------------------------------------------------------
/free_gait_core/doc/motion_examples.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ShunyaoWang/quadruped_locomotion/fddfafba2c217ad0412d7045d1bb579ce034744b/free_gait_core/doc/motion_examples.jpg
--------------------------------------------------------------------------------
/free_gait_core/doc/motion_examples_preview.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ShunyaoWang/quadruped_locomotion/fddfafba2c217ad0412d7045d1bb579ce034744b/free_gait_core/doc/motion_examples_preview.jpg
--------------------------------------------------------------------------------
/free_gait_core/doc/notions_and_coordinate_systems.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ShunyaoWang/quadruped_locomotion/fddfafba2c217ad0412d7045d1bb579ce034744b/free_gait_core/doc/notions_and_coordinate_systems.pdf
--------------------------------------------------------------------------------
/free_gait_core/doc/notions_and_coordinate_systems_preview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ShunyaoWang/quadruped_locomotion/fddfafba2c217ad0412d7045d1bb579ce034744b/free_gait_core/doc/notions_and_coordinate_systems_preview.png
--------------------------------------------------------------------------------
/free_gait_core/include/free_gait_core/TypePrints.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * TypePrints.cpp
3 | *
4 | * Created on: Nov 19, 2015
5 | * Author: Péter Fankhauser
6 | * Institute: ETH Zurich, Autonomous Systems Lab
7 | */
8 |
9 | #pragma once
10 |
11 | #include "free_gait_core/TypeDefs.hpp"
12 |
13 | namespace free_gait {
14 |
15 | std::ostream& operator<< (std::ostream& out, const ControlLevel& controlLevel);
16 | std::ostream& operator<< (std::ostream& out, const ControlSetup& controlSetup);
17 | std::ostream& operator<< (std::ostream& out, const LimbEnum& limb);
18 | std::ostream& operator<< (std::ostream& out, const BranchEnum& branch);
19 | //std::ostream& operator<< (std::ostream& out, const bool boolean);
20 | std::ostream& operator<< (std::ostream& out, const std::unordered_map& limbBooleanMap);
21 | std::ostream& operator<< (std::ostream& out, const std::unordered_map& limbVectorMap);
22 | std::ostream& operator<< (std::ostream& out, const Stance& stance);
23 |
24 | } // namespace
25 |
--------------------------------------------------------------------------------
/free_gait_core/include/free_gait_core/base_motion/base_motion.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * base_motion.hpp
3 | *
4 | * Created on: Oct 19, 2015
5 | * Author: Péter Fankhauser
6 | * Institute: ETH Zurich, Autonomous Systems Lab
7 | */
8 |
9 | #pragma once
10 |
11 | #include "free_gait_core/base_motion/BaseMotionBase.hpp"
12 | #include "free_gait_core/base_motion/BaseAuto.hpp"
13 | #include "free_gait_core/base_motion/BaseTarget.hpp"
14 | #include "free_gait_core/base_motion/BaseTrajectory.hpp"
15 |
--------------------------------------------------------------------------------
/free_gait_core/include/free_gait_core/executor/BatchExecutor.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * BatchExecutor.hpp
3 | *
4 | * Created on: Dec 20, 2016
5 | * Author: Péter Fankhauser
6 | * Institute: ETH Zurich, Autonomous Systems Lab
7 | */
8 |
9 | #pragma once
10 |
11 | #include "free_gait_core/executor/Executor.hpp"
12 | #include "free_gait_core/executor/AdapterBase.hpp"
13 | #include "free_gait_core/executor/StateBatch.hpp"
14 |
15 | #include //duo xian cheng
16 | #include
17 | #include //function object
18 | #include //duoxiancheng tongbu caozuo
19 |
20 | namespace free_gait {
21 |
22 | class BatchExecutor
23 | {
24 | public:
25 | BatchExecutor(free_gait::Executor& executor);
26 | virtual ~BatchExecutor();
27 |
28 | void addProcessingCallback(std::function callback);
29 | void setTimeStep(const double timeStep);
30 | double getTimeStep() const;
31 | bool process(const std::vector& steps);
32 | bool isProcessing();
33 | void cancelProcessing();
34 |
35 | const StateBatch& getStateBatch() const;
36 |
37 | private:
38 | void processInThread();
39 |
40 | StateBatch stateBatch_;
41 | free_gait::Executor& executor_;
42 |
43 | std::function callback_;
44 | double timeStep_;
45 | std::atomic isProcessing_;
46 | std::atomic requestForCancelling_;
47 | };
48 |
49 | } /* namespace free_gait_rviz_plugin */
50 |
--------------------------------------------------------------------------------
/free_gait_core/include/free_gait_core/executor/ExecutorState.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * ExecutorState.hpp
3 | *
4 | * Created on: Mar 8, 2017
5 | * Author: Péter Fankhauser
6 | * Institute: ETH Zurich, Robotic Systems Lab
7 | */
8 |
9 | #pragma once
10 |
11 | #include
12 |
13 | namespace free_gait {
14 |
15 | class ExecutorState
16 | {
17 | public:
18 | ExecutorState();
19 | ExecutorState(size_t stepNumber, double stepPhase);
20 | virtual ~ExecutorState();
21 |
22 | void setState(size_t stepNumber, double stepPhase);
23 | const size_t stepNumber() const;
24 | const double stepPhase() const;
25 |
26 | friend bool operator>(const ExecutorState& stateA, const ExecutorState& stateB);
27 | friend bool operator<=(const ExecutorState& stateA, const ExecutorState& stateB);
28 | friend bool operator<(const ExecutorState& stateA, const ExecutorState& stateB);
29 | friend bool operator>=(const ExecutorState& stateA, const ExecutorState& stateB);
30 |
31 | private:
32 | size_t stepNumber_;
33 | double stepPhase_;
34 | };
35 |
36 | } /* namespace free_gait */
37 |
--------------------------------------------------------------------------------
/free_gait_core/include/free_gait_core/executor/StateBatch.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * StateBatch.hpp
3 | *
4 | * Created on: Dec 20, 2016
5 | * Author: Péter Fankhauser
6 | * Institute: ETH Zurich, Autonomous Systems Lab
7 | */
8 |
9 | #pragma once
10 |
11 | #include
12 |
13 | #include