Skip to content

Commit

Permalink
Add more debug print out to the spline example
Browse files Browse the repository at this point in the history
  • Loading branch information
urrsk committed Aug 3, 2023
1 parent 4ef931d commit c179569
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions examples/spline_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,10 @@ int main(int argc, char* argv[])
ret = g_my_driver->writeJointCommand(vector6d_t(), comm::ControlMode::MODE_FORWARD);
if (!ret)
{
URCL_LOG_ERROR("Could not send joint command. Is the robot in remote control?");
std::stringstream lastq;
lastq << g_joint_positions;
URCL_LOG_ERROR("Could not send joint command. Last q received is %s\n Is the robot in remote control?",
lastq.str().c_str());
return 1;
}

Expand Down Expand Up @@ -247,7 +250,10 @@ int main(int argc, char* argv[])

if (!ret)
{
URCL_LOG_ERROR("Could not send joint command. Is the robot in remote control?");
std::stringstream lastq;
lastq << g_joint_positions;
URCL_LOG_ERROR("Could not send joint command. Last q received is %s\n Is the robot in remote control?",
lastq.str().c_str());
return 1;
}
}
Expand Down Expand Up @@ -276,7 +282,10 @@ int main(int argc, char* argv[])

if (!ret)
{
URCL_LOG_ERROR("Could not send joint command. Is the robot in remote control?");
std::stringstream lastq;
lastq << g_joint_positions;
URCL_LOG_ERROR("Could not send joint command. Last q received is %s\n Is the robot in remote control?",
lastq.str().c_str());
return 1;
}
}
Expand All @@ -287,7 +296,10 @@ int main(int argc, char* argv[])
ret = g_my_driver->writeJointCommand(vector6d_t(), comm::ControlMode::MODE_FORWARD);
if (!ret)
{
URCL_LOG_ERROR("Could not send joint command. Is the robot in remote control?");
std::stringstream lastq;
lastq << g_joint_positions;
URCL_LOG_ERROR("Could not send joint command. Last q received is %s\n Is the robot in remote control?",
lastq.str().c_str());
return 1;
}
return 0;
Expand Down

0 comments on commit c179569

Please sign in to comment.