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
bool HandEyeSolverDefault::solve(const std::vector<Eigen::Isometry3d>& effector_wrt_world,
const std::vector<Eigen::Isometry3d>& object_wrt_sensor, SensorMountType setup,
const std::string& solver_name)
{
// Check the size of the two sets of pose sample equal
if (effector_wrt_world.size() != object_wrt_sensor.size())
{
ROS_ERROR_STREAM_NAMED(LOGNAME, "The sizes of the two input pose sample "
"vectors are not equal: "
"effector_wrt_world.size() = "
<< effector_wrt_world.size()
<< " and object_wrt_sensor.size() == " << object_wrt_sensor.size());
return false;
}
auto it = std::find(solver_names_.begin(), solver_names_.end(), solver_name);
if (it == solver_names_.end())
{
ROS_ERROR_STREAM_NAMED(LOGNAME, "Unknown handeye solver name: " << solver_name);
return false;
}
char program_name[7] = "python";
#if PY_MAJOR_VERSION >= 3
Py_SetProgramName(Py_DecodeLocale(program_name, NULL));
#else
Py_SetProgramName(program_name);
#endif
static bool numpy_loaded{ false };
if (!numpy_loaded) // Py_Initialize() can only be called once when numpy is
// loaded, otherwise will segfault
{
Py_Initialize();
atexit(Py_Finalize);
numpy_loaded = true;
}
ROS_DEBUG_STREAM_NAMED(LOGNAME, "Python C API start");
// Load numpy c api
if (_import_array() < 0)
{
ROS_ERROR_STREAM_NAMED(LOGNAME, "Error importing numpy: ");
return false;
}
I noticed that ROS neotic has switched to Python 3 and I believe in thie calibration tool is still using python 2. Is there any plan to update it? (At least in the CMakeLists.txt it is still searching for python 2)
#21 added support for Python 3, and I've run MoveIt Calibration on noetic. Are you sure you have NumPy installed?
Also, please format the code in your post--it is very hard to read otherwise. In-line code is marked with single backticks, and code blocks are marked with triple backticks. (The formatting manual is here.)
Description
While running the calibration, the plugin reports an issue of importing numpy
[ERROR] [1616890018.137078130]: Error importing numpy:
Which refers to the code:
I noticed that ROS neotic has switched to Python 3 and I believe in thie calibration tool is still using python 2. Is there any plan to update it? (At least in the CMakeLists.txt it is still searching for python 2)
Your environment
The text was updated successfully, but these errors were encountered: