You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Create a SynchronizedCommand within the RobotCommand
auto* synchronizedCommand = robotCommand.mutable_synchronized_command();
// Set up the ArmCommand inside the SynchronizedCommand
auto* armCommand = synchronizedCommand->mutable_arm_command();
// Build the cylindrical velocity command
auto* cylindrical_velocity = armCommand->mutable_arm_velocity_command()->mutable_cylindrical_velocity();
cylindrical_velocity->mutable_linear_velocity()->set_r(extensionSpeed); // Set radial speed (in/out)
cylindrical_velocity->mutable_linear_velocity()->set_theta(0.0); // No angular movement
cylindrical_velocity->mutable_linear_velocity()->set_z(0.0); // No vertical movement
// Use chrono for high-precision timing
auto now = std::chrono::system_clock::now();
auto duration = std::chrono::milliseconds(500); // Duration of 0.5 seconds
auto future_time = now + duration;
auto secs = std::chrono::time_point_cast<std::chrono::seconds>(future_time);
auto nanos = std::chrono::duration_cast<std::chrono::nanoseconds>(future_time - secs).count();
// Set the end_time using google::protobuf::Timestamp
auto* end_time = armCommand->mutable_arm_velocity_command()->mutable_end_time();
end_time->set_seconds(secs.time_since_epoch().count());
end_time->set_nanos(nanos);
// Send the arm command and check the result
auto arm_res = sendArmCommand(robotCommand);
if (!arm_res) {
return false;
}
return true;
}
the error im getting is:
[component_container_mt-1] [ERROR] [1726597323.348119238] [XTRA]: [SpotRobodog.cpp:609 sendArmCommand()]>> Failed to send arm command: 6(STATUS_TOO_DISTANT): \
the extensionSpeed = 0.1
maybe is the timing?
thanks !
The text was updated successfully, but these errors were encountered:
Hi
im trying to write a simple are manipulation function using the cpp API, i have an issue with moving the arm in/out.
bool SpotRobodog::moveArmInOut(float extensionSpeed)
{
bosdyn::api::RobotCommand robotCommand;
}
the error im getting is:
[component_container_mt-1] [ERROR] [1726597323.348119238] [XTRA]: [SpotRobodog.cpp:609 sendArmCommand()]>> Failed to send arm command: 6(STATUS_TOO_DISTANT): \
the extensionSpeed = 0.1
maybe is the timing?
thanks !
The text was updated successfully, but these errors were encountered: