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
std::vector<KinovaDevice> devices_list;
result = NO_ERROR_KINOVA;
jaco_api_.getDevices(devices_list, result);
if (result != NO_ERROR_KINOVA)
{
throw JacoCommException("Could not get devices list", result);
}
bool found_arm = false;
for (int device_i = 0; device_i < devices_list.size(); device_i++)
{
// If no device is specified, just use the first available device
if ((serial_number == "")
|| (std::strcmp(serial_number.c_str(), devices_list[device_i].SerialNumber) == 0))
{
result = jaco_api_.setActiveDevice(devices_list[device_i]);
if (result != NO_ERROR_KINOVA)
{
throw JacoCommException("Could not set the active device", result);
}
GeneralInformations general_info;
result = jaco_api_.getGeneralInformations(general_info);
if (result != NO_ERROR_KINOVA)
{
throw JacoCommException("Could not get general information about the device", result);
}
ClientConfigurations configuration;
getConfig(configuration);
QuickStatus quick_status;
getQuickStatus(quick_status);
robot_type_ = quick_status.RobotType;
if ((robot_type_ != 0) && (robot_type_ != 1) && (robot_type_ != 3))
{
ROS_ERROR("Could not get the type of the arm from the quick status, expected "
"either type 0 (JACO), or type 1 (MICO), got %d", quick_status.RobotType);
throw JacoCommException("Could not get the type of the arm", quick_status.RobotType);
}
switch (robot_type_) {
case 0:
case 3:
num_fingers_ = 3;
break;
case 1:
num_fingers_ = 2;
break;
default:
break;
}
ROS_INFO_STREAM("Found " << devices_list.size() << " device(s), using device at index " << device_i
<< " (model: " << configuration.Model
<< ", serial number: " << devices_list[device_i].SerialNumber
<< ", code version: " << general_info.CodeVersion
<< ", code revision: " << general_info.CodeRevision << ")");
found_arm = true;
break;
}
}
if (!found_arm)
{
ROS_ERROR("Could not find the specified arm (serial: %s) among the %d attached devices",
serial_number.c_str(), static_cast<int>(devices_list.size()));
throw JacoCommException("Could not find the specified arm", 0);
}
Now I'd like to know whether wpi_jaco library can support dual arms. And if not, I'd like to try to contribute some code to make it possible.
The text was updated successfully, but these errors were encountered:
Currently the wpi_jaco package only supports one arm. If you'd like to contribute code to support multiple arms, that would be great! I halted development on this package for a while since I haven't had an arm to test on during the last few months, but we're getting a new arm very soon, so if you have contributions that can extend the functionality of the package, I'll be able to test them again and accept pull requests.
Thanks for your interest, and sorry for the delayed response!
Firstly, thank you for your hard work for the wpi_jaco library, it really saves much time for me.
Now I'm working to control two jaco arms in one robot, and I'm confused that I haven't found any code for suiting two arms in wpi_jaco library.
In the official ros repository I've found the following code
Now I'd like to know whether wpi_jaco library can support dual arms. And if not, I'd like to try to contribute some code to make it possible.
The text was updated successfully, but these errors were encountered: