Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues to get the camera_calibration running #139

Open
Felix2M opened this issue Feb 13, 2024 · 0 comments
Open

Issues to get the camera_calibration running #139

Felix2M opened this issue Feb 13, 2024 · 0 comments

Comments

@Felix2M
Copy link

Felix2M commented Feb 13, 2024

Since I head lots of issues to get this plugin running with Ubuntu 20.04 I created a ReadMe file how I was able to compile and run it. I would appreciate if someone could provide some help to set it up easier or add some steps to the official ReadMe file.

Additionally I had some issues with a distirbuted ROS Systems. The calibration software takes the sample immediatly after the robot reaches the position, but sometimes my TF was not up to date already, so I added a delay to solve this problem with:

bool ControlTabWidget::takeTransformSamples()
{
  // Store the pair of two tf transforms and calculate camera_robot pose
  sleep(1.5);

This was already mentioned in #103, but I think there are better solutions to this.

Also my re-projectionerror was quite high. I got for translation an error of 0.3 m, which would be a lot. When I tested the system with this high error it was able grasp with an accuracy of 3 mm. Is this a unit problem or does this only occur in my case?

Here the ReadMe file:

Moveit Calibration

Install Package to calibrate the camera position

git clone https://github.com/ros-planning/moveit_calibration
cd ..
rosdep install --from-paths src --ignore-src -r -y
catkin_make

Install dependencies

Install the dependencies in your catkin workspace.

Handeye is needed otherwise the error "Failed to load python module: handeye.calibrator" occurs when taking calibration samples (see last step). Install it:

git clone https://github.com/crigroup/handeye.git
rosdep install --from-paths . --ignore-src -r -y
cd ..
catkin_make

The handeye package is depending on baldor. Install it:

git clone https://github.com/crigroup/baldor.git
rosdep install --from-paths . --ignore-src -r -y
cd ..
catkin_make

Check your version normal is 0.3.8 but we need >=0.3.9
To install follow the following steps of #109 (comment) to install

pkg-config --modversion openblas

Remove existing openblas. Do this with caution and maybe backup your machine first!!
sudo apt -y remove libopenblas*

download openblas from official github page

cd ~
wget https://github.com/xianyi/OpenBLAS/releases/download/v0.3.23/OpenBLAS-0.3.23.tar.gz
tar xf OpenBLAS-0.3.23.tar.gz 
cd OpenBLAS-0.3.23/
make
make install
cd ~/Downloads
unzip "OpenBLAS 0.3.9 version.zip" -d /opt
cd /opt
sudo mv xianyi-OpenBLAS-33f76a6 "OpenBLAS-0.3.9"
cd OpenBLAS-0.3.9/
sudo make FC=gfortran
sudo make install
export PKG_CONFIG_PATH=/opt/OpenBLAS/lib/pkgconfig:$PKG_CONFIG_PATH
pkg-config --modversion openblas

Create a symbolic link to the lib folder:

sudo ln -s /home/faps/OpenBLAS-0.3.23/libopenblas.so /usr/lib/x86_64-linux-gnu/libopenblas.so

Modifications for using saved joint_states.yaml

Change the handeye_control_widget.cpp, which is located at moveit_calibration/moveit_calibration_gui/handeye_calibration_rviz_plugin/src/handeye_control_widget.cpp

Add sleep to make sure the tf tree is updated before taking a sample:

bool ControlTabWidget::takeTransformSamples()
{
  // Store the pair of two tf transforms and calculate camera_robot pose
  sleep(1.5);

Change robot velocity:

move_group_->setMaxVelocityScalingFactor(0.5); ==> move_group_->setMaxVelocityScalingFactor(0.1);
move_group_->setMaxAccelerationScalingFactor(0.5); ==> move_group_->setMaxAccelerationScalingFactor(0.1);

and build the workspace afterwards with catkin_make

Start Calibration Setup

start a new terminal with the following commands:

export LC_NUMERIC=en_US.UTF-8
rviz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant