Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion obelisk/cpp/hardware/robots/unitree/g1_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ namespace obelisk {
if (this->pub_temps_) {
joint_state.motor_surface_temps.resize(num_motors_);
joint_state.motor_winding_temps.resize(num_motors_);
joint_state.motor_states.resize(num_motors_);
}

size_t ind = 0;
Expand All @@ -255,7 +256,7 @@ namespace obelisk {
if (this->pub_temps_) {
joint_state.motor_surface_temps.at(ind) = low_state.motor_state()[i].temperature()[0];
joint_state.motor_winding_temps.at(ind) = low_state.motor_state()[i].temperature()[1];

joint_state.motor_states.at(ind) = low_state.motor_state()[i].motorstate();
}

ind++;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ float64[] joint_pos
float64[] joint_vel
float64[] motor_surface_temps
float64[] motor_winding_temps
uint32[] motor_states # per-motor fault/error code from the vendor low state (0 = OK); populated together with the temps
string[] joint_names