灵巧手抓取示例

要求:灵巧手(手臂尽可能简单)抓取不同摩擦力的常见物体(能抓到就行,不需要用模型)

环境

基础安装

  1. git(为了及时更新genesis)
  2. git clone https://github.com/Genesis-Embodied-AI/Genesis.git
  3. 为了方便import genesis,在~/.bashrc里面加入 export PYTHONPATH=/data/zly/Genesis:$PYTHONPATH
  4. conda
  5. Python: 3.9+,conda create -n genesis python==3.10
  6. torch:nvidia-smi查出来最高12.0。pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
  7. 在Gnesis文件夹里面 pip install -e .

可选安装

  1. ompl:不知道能不能用:(
    1. pip debug --verbose 查看支持的cp版本: cp310-cp310-manylinux_2_27_x86_64。表示这个系统glibc2.27。但是提供的只有2.28+的

      1. 算了,安装ompl一堆问题,运动规划库而以,懒得搞了
      2. 方案1:重新编译
        1. Boost 1.58 or higher
          1. boost各版本下载
          2. 准备用1.60
            1. 下载.tar.gz
            2. tar -xvzf boost_1_70_0.tar.gz
            3. 放在/application/boost_1_60_0文件夹里
            4. boost_1_60_0$ ./bootstrap.sh --prefix=/data/zly/application/boost
            5. ./b2 install
            6. 检验:
              1. touch test.cpp
              2. vim test.cpp
                1
                2
                3
                4
                5
                6
                7
                8
                9
                10
                #include<iostream>
                #include<boost/bind/bind.hpp>
                using namespace std;
                using namespace boost::placeholders;
                int fun(int x,int y){return x+y;}
                int main(){
                int m=1;int n=2;
                cout<<boost::bind(fun,_1,_2)(m,n)<<endl;
                return 0;
                }
              3. g++ test.cpp -o test
              4. ./test 输出3,ok
            7. 加入环境变量echo 'export BOOST_ROOT=/data/zly/application/boost' >> ~/.bashrc echo 'export LD_LIBRARY_PATH=$BOOST_ROOT/lib:$LD_LIBRARY_PATH' >> ~/.bashrc echo 'export CPATH=$BOOST_ROOT/include:$CPATH' >> ~/.bashrc echo 'export LIBRARY_PATH=$BOOST_ROOT/lib:$LIBRARY_PATH' >> ~/.bashrc
        2. cmake(version 3.5 or higher)
          1. cmake --version输出3.10.2,那就不安装了
        3. eigen (version 3.3 or higher)
          1. 从gitlab下载源代码
          2. 选择3.4.0
          3. 下载解压
          4. 测试代码
            1
            2
            3
            4
            5
            6
            7
            8
            9
            10
            11
            12
            #include <iostream>
            #include <Eigen/Dense>
            using Eigen::MatrixXd;
            int main()
            {
            MatrixXd m(2,2);
            m(0,0) = 3;
            m(1,0) = 2.5;
            m(0,1) = -1;
            m(1,1) = m(1,0) + m(0,1);
            std::cout << m << std::endl;
            }
            g++ -I /path/to/eigen/ my_program.cpp -o my_program
          把上面两个加入c++的头文件里面another option is to symlink or copy the Eigen folder into /usr/local/include/

      py++直接pip3 install -vU pygccxml pyplusplus安装 C++14 compiler 满足 下载ompl库wget https://github.com/ompl/ompl/archive/refs/tags/1.6.0.tar.gz,然后 tar -xzvf 1.6.0.tar.gz

      尝试cmake ../.. 时报错 /usr/bin/c++: 2: /usr/bin/c++: clang++: not found

      1. wget https://github.com/llvm/llvm-project/releases/download/llvmorg-14.0.0/clang+llvm-14.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz
  2. splashsurf
    1. 安装cargo:curl -sSf https://static.rust-lang.org/rustup.sh | sh,然后回车,最后要重启terminal
    2. cargo install splashsurf

genesis摩擦系数设置

  1. 先用基础的方块,简单franka抓取。
    1. 确定位置/相机设定
    2. 为什么用example data的0.5会弹出去..它系统又出了什么bug
    3. friction must be in the range [1e-2, 5.0] for simulation stability.
  2. 方块加上friction ok
    1. material=gs.materials.Rigid(friction=friction)。看到很多加了这个。
    2. set_friction 还没尝试,以后再看,material设置的基本够了
  3. 方块加上mass?先不管,没空搞
  4. 解析dataset:MultiDex
    1. '

嗯现在物品能导入了就是变成灰模了,不管

https://github.com/IRVLUTD/isaac_sim_grasping/ 这个仓库里的gripper都符合我的需求。不行,有的没有collision

  1. 导入3finger gripper
  2. 导入sapien 下载的object(比如水杯)
  3. 调整3finger的位置到obj附近
  4. 抓取
  5. 抓取后移动
  6. 加入机械臂 ur5e
  7. 调整运动轨迹
  8. 设置不同摩擦力
  9. 整理3f+水杯结果

怎么获得jnt_names来着