uoft-cs-robotics / robot_system_tools

Repository containing software infrastructure for running experiments on Franka Emika Panda Arms
9 stars 3 forks source link

Dev/ros api/calibration #18

Closed Ruthrash closed 1 year ago

Ruthrash commented 1 year ago

Probable stable features in this pull request

kouroshD commented 1 year ago

On the real_time machine side, still there is problem with ROS_MASTER_URI, ROS_HOSTNAME; and ROS_IP. roscore runs on the workstation machine. have a look on this link for correctly setting the those variables.

kouroshD commented 1 year ago

Also, related to the reseting the robot arm as the test case, there is the following problem. since, we do not have franka gripper, reset_arm does not work and it will block at fa=FrankaArm(). To check, till this point was OK, I ran the following script:

root@sf3202msi-Z490-A-PRO-Aegis-RS:~/git/frankapy# python3
Python 3.8.10 (default, Nov 14 2022, 12:59:47) 
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from frankapy import FrankaArm
WARNING:root:autolab_core not installed as catkin package, RigidTransform ros methods will be unavailable
>>> fa = FrankaArm( with_gripper=False)
>>> fa.reset_pose()
Ruthrash commented 1 year ago

On the real_time machine side, still there is problem with ROS_MASTER_URI, ROS_HOSTNAME; and ROS_IP. roscore runs on the workstation machine. have a look on this link for correctly setting the those variables.

strange that this error pops up as startup scripts from frankapy set these environment variables in the realtime computer. see below

kouroshD commented 1 year ago

strange that this error pops up as startup scripts from frankapy set these environment variables in the realtime computer. see below before setting them manually, the ROS_MASTER_URI was set to localhost, and ROS_HOSTNAME and ROS_IP were empty.

btw, here https://github.com/iamlab-cmu/franka-interface/blob/780a6c81983c83a93d6ed72b413db5b325442343/bash_scripts/set_rosmaster.sh#L8 the ROS_IP is set to the realtime machine ip whereas I set it in our case to where roscore was running, i.e., the same as ros master uri. Looking at http://wiki.ros.org/ROS/EnvironmentVariables#ROS_IP.2FROS_HOSTNAME, it explains why it was working, ros_hostname takes precedence over ros_ip when both are set. So, we should update this later in our real_time machine by setting ros_ip as real_time machine ip.

kouroshD commented 1 year ago

On the real_time machine side, still there is problem with ROS_MASTER_URI, ROS_HOSTNAME; and ROS_IP. roscore runs on the workstation machine. have a look on this link for correctly setting the those variables.

strange that this error pops up as startup scripts from frankapy set these environment variables in the realtime computer. see below

coming back again to this point, since we are sourcing the terminals that are opened by this script, it does not affect other terminals. So, in my case, when I opened a new terminal in realtime machine, I could not run communicate with the workstation machine. But we are not normally opening new terminals in realtime machine. Proabably you are right, it might be the case only for the with_gripper=False should fix the problem, without the need to set the env variables. to be checked!

n-yoshikawa commented 1 year ago

I confirmed the docker scripts are compatible with docker-compose v2.

kouroshD commented 1 year ago

wha is the difference between https://github.com/pairlab/franka_arm_infra/blob/dev/rosAPI/calibration/calibration/README.md and https://github.com/pairlab/franka_arm_infra/blob/dev/rosAPI/calibration/calibration/docs/USAGE.md?

Ruthrash commented 1 year ago

wha is the difference between https://github.com/pairlab/franka_arm_infra/blob/dev/rosAPI/calibration/calibration/README.md and https://github.com/pairlab/franka_arm_infra/blob/dev/rosAPI/calibration/calibration/docs/USAGE.md?

Usage will have instructions specific to using our calibration tool. As for README, I havent' completed it yet, but in there I am thinking of providing a light theoretical background to the problem + best practices (aimed at people who are completely new to doing the hand-eye calibration) the particular file you are referring to is a clone and it has been removed now

kouroshD commented 1 year ago

documentation missing for calibration:

n-yoshikawa commented 1 year ago

The gripper problem mentioned in https://github.com/pairlab/franka_arm_infra/pull/18#issuecomment-1469011432 should be solved by changing the line 32 of bash_scripts/start_control_pc.sh from with_gripper=1 to with_gripper=0. This is the solution used in our lab computer.

Ruthrash commented 1 year ago

documentation missing for calibration:

  • first give a very brief and general overview of the calibration process;

    • like printing april tags;
    • run tf related custom code by user if not using a standard franka robot or if using another robot;
    • running scripts for calibration;
    • and then what the user should do with the returned calibration matrix. Also I did not see where it was written where to put the april tag boards in our experiments, we did not use your april tag pdf
  • I think in general it would be nice to have images coming from camera visualized so that the user knows if the board is completely visible or not to the camera;
  • we printed the april board US letter, and measured the sizes. When printed out, we had following values:
        markerLength = 0.0252
        markerSeparation = 0.0049 

Which are different from the one written in :

https://github.com/pairlab/franka_arm_infra/blob/9d56e14a1c41e3c8fe878c87dcff83cbce7b05bd/calibration/ROSCameraRobotCalibration.py#L36-L37

n-yoshikawa commented 1 year ago
kouroshD commented 1 year ago

Hi @Ruthrash , I had made some change requests before your recent changes but I forgot to submit my change request and that's why now they are suggested on an outdated file. Please kindly go through them; I think they are helpful. Thanks

Ruthrash commented 1 year ago

Thanks a lot for the reviews @n-yoshikawa and @kouroshD