mirror of https://github.com/fan-ziqi/rl_sar.git
feat: don't autograd
This commit is contained in:
parent
b8b0c066a2
commit
81fa87035a
|
@ -9,6 +9,8 @@ RL_Real rl_sar;
|
||||||
|
|
||||||
RL_Real::RL_Real() : safe(LeggedType::A1), udp(LOWLEVEL)
|
RL_Real::RL_Real() : safe(LeggedType::A1), udp(LOWLEVEL)
|
||||||
{
|
{
|
||||||
|
torch::autograd::GradMode::set_enabled(false);
|
||||||
|
|
||||||
ReadYaml(ROBOT_NAME);
|
ReadYaml(ROBOT_NAME);
|
||||||
|
|
||||||
udp.InitCmdData(cmd);
|
udp.InitCmdData(cmd);
|
||||||
|
|
|
@ -9,6 +9,8 @@ RL_Real rl_sar;
|
||||||
|
|
||||||
RL_Real::RL_Real() : CustomInterface(500)
|
RL_Real::RL_Real() : CustomInterface(500)
|
||||||
{
|
{
|
||||||
|
torch::autograd::GradMode::set_enabled(false);
|
||||||
|
|
||||||
ReadYaml(ROBOT_NAME);
|
ReadYaml(ROBOT_NAME);
|
||||||
|
|
||||||
start_time = std::chrono::high_resolution_clock::now();
|
start_time = std::chrono::high_resolution_clock::now();
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
|
|
||||||
RL_Sim::RL_Sim()
|
RL_Sim::RL_Sim()
|
||||||
{
|
{
|
||||||
|
torch::autograd::GradMode::set_enabled(false);
|
||||||
|
|
||||||
ReadYaml(ROBOT_NAME);
|
ReadYaml(ROBOT_NAME);
|
||||||
|
|
||||||
// Due to the fact that the robot_state_publisher sorts the joint names alphabetically,
|
// Due to the fact that the robot_state_publisher sorts the joint names alphabetically,
|
||||||
|
|
Loading…
Reference in New Issue