The correponding hardware python client is seen here:
#include "dynamic_graph_manager/TestUserCmdBool.h"
{
{
public:
{
boolean_set_by_user_cmd_ = false;
}
{
}
{
}
{
map["encoders"].setRandom();
map["imu_accelerometer"].setRandom();
map["imu_gyroscope"].setRandom();
map["imu"].setRandom();
}
{
desired_torques_ = map.at("torques");
desired_positions_ = map.at("positions");
}
{
bool ret = boolean_set_by_user_cmd_;
return ret;
}
dynamic_graph_manager::TestUserCmdBool::Request& req,
dynamic_graph_manager::TestUserCmdBool::Response& res)
{
res.sanity_check = true;
return true;
}
{
bool check = true;
return check || DynamicGraphManager::is_in_safety_mode();
}
{
for (dynamic_graph::VectorDGMap::iterator ctrl =
++ctrl)
{
ctrl->second.fill(0.0);
}
}
private:
{
boolean_set_by_user_cmd_ = user_input;
}
std::atomic_bool boolean_set_by_user_cmd_;
dynamicgraph::Vector desired_torques_, desired_positions_;
};
}