zoukankan      html  css  js  c++  java
  • 11.11-使用CytonGamma

    cyton gamma

    前言

    • 要操纵机械臂,学习一下基本知识

    参考

    cyton_actin_ros_driver

    学习记录

    设置波特率(必要时)

    sudo stty -F /dev/ttyS0 9600
    sudo stty -F /dev/ttyS0 -a

    cytonviwer安装

    从USB插上机械臂才能够进行实验

    cd ~/ProgramFile/Robai/Cyton Gamma 1500 Viewer_4.0.12-20160307/bin/
    sudo chmod 777 /dev/ttyUSB0
    sudo chmod 777 /dev/ttyUSB1
    sudo chmod 777 /dev/ttyUSB2
    sudo chmod 777 /dev/ttyUSB3
    sudo usermod -a -G dialout zs
    ./cytonViewer
    This application failed to start because it could not find or load the Qt platform plugin "xcb".
    • 搞了半天没解决,换台电脑试试。
    • 换台电脑也一样,需要设置环境变量
    export LD_LIBRARY_PATH="/home/zs/catkin_ws/src/cyton_actin_ros_driver/Robai/Cyton Gamma 1500 Viewer_4.0.12-20160307/lib"
    export LD_LIBRARY_PATH="/home/zs/Downloads/TestingPackages/sim_ws/src/cyton_actin_ros_driver/Robai/Cyton Gamma 1500 Viewer_4.0.12-20160307/lib"

    ros包安装

    git clone https://git.lcsr.jhu.edu/ggarime1/cyton_actin_ros_driver.git
    cd ./cyton_actin_ros_driver
    ./cyton_installer.sh
    y
    y
    catkin_make

    Viwer 使用

    cd '/home/zs/Downloads/TestingPackages/sim_ws/src/cyton_actin_ros_driver/Robai/Cyton Gamma 1500 Viewer_4.0.12-20160307/bin'
    ./.cytonViewer
    • Think of this dragger frame as the desired position of the active end effector of the model. You can move the position and orientation of the dragger by clicking and dragging the mouse. Dragging with the left mouse button changes the translation of the dragger. Dragging with the right mouse button changes the orientation. Scrolling the mouse wheel moves the dragger towards and away from the screen. Holding the x key will constrain the movement to the x axis of the viewer plane, and y will constrain the movement to the y axis of the viewer plane. The robot model will not try and move unless the simulation is running. Run the simulation by clicking play and the robot should follow the guide frame.

    ROS包构建

    # CMakeLists.txt
    # find_package(Boost REQUIRED COMPONENTS thread iostreams-mt filesystem-mt program_options-mt system-mt date_time-mt)
    find_package(Boost REQUIRED COMPONENTS thread iostreams filesystem program_options system date_time)
    # CytonConfig.cmake
    # Make sure we can find the Actin distribution
    set(CYTON_ROOT_DIR ${PROJECT_SOURCE_DIR}/Robai/Cyton Gamma 1500 Viewer_4.0.12-20160307)
    
    set(toolkits ${CYTON_ROOT_DIR}/toolkits)
    set(external ${CYTON_ROOT_DIR}/external)
    
    set(src ${toolkits}/examples/src)
    # set(render_inc "${external}/render_OSS-20150520-gcc4.8-amd64/OSG-3.2.1/include" "${external}/render_OSS-20150520-gcc4.8-amd64/Qt-5.3.2/include")
    # set(render_lib  "${external}/sensor_OSS-20150520-gcc4.8-amd64/OpenCV-2.4.10/lib" "${external}/sensor_OSS-20150520-gcc4.8-amd64/tiff-3.9.7/lib" "${external}/sensor_OSS-20150520-gcc4.8-amd64/libdc1394-2.1.0/lib" "${external}/sensor_OSS-20150520-gcc4.8-amd64/libraw1394-2.0.2/lib" ${external}/render_OSS-20150520-gcc4.8-amd64/Qt-5.3.2/lib ${external}/render_OSS-20150520-gcc4.8-amd64/OSG-3.2.1/lib)
    # set(qt_moc_path "${external}/render_OSS-20150520-gcc4.8-amd64/Qt-5.3.2/bin")
    
    # Set directory to include headers
    set(CYTON_INCLUDE_DIRS ${CYTON_ROOT_DIR}/include)
    
    set(CYTON_RENDER_INCLUDE_DIRS ${external}/render_OSS-20150520-gcc4.8-amd64/OSG-3.2.1/include ${external}/render_OSS-20150520-gcc4.8-amd64/Qt-5.3.2/include)
    
    # Set directory to library files.
    set(CYTON_LIBRARY_DIRS ${CYTON_ROOT_DIR}/lib ${CYTON_ROOT_DIR}/bin)
    
    set(CYTON_RENDER_LIBRARY_DIRS ${external}/sensor_OSS-20150520-gcc4.8-amd64/OpenCV-2.4.10/lib ${external}/render_OSS-20150520-gcc4.8-amd64/OSG-3.2.1/lib ${external}/render_OSS-20150520-gcc4.8-amd64/Qt-5.3.2/lib ${external}/sensor_OSS-20150520-gcc4.8-amd64/tiff-3.9.7/lib ${external}/sensor_OSS-20150520-gcc4.8-amd64/libjpeg9a/lib)
    
    # set(qt_lib Qt5Core Qt5Gui Qt5Widgets)
    # set(osg_lib osg)
    
    # CYTON DEFINITIONS:
    set(CYTON_DEFINITIONS -DEC_BUILD_SHARED_LIBS
                          -DEC_HAVE_ACTIN     
                          -DUNICODE
                          -D_UNICODE
                          "-DACTIN_VERSION_MAJOR=4"
                          "-DACTIN_VERSION_MINOR=0"
                          "-DACTIN_VERSION_PATCH=12"
                          "-DACTIN_VERSION="4.0.12"")
    
    ########CYTON CONFIGURATION###########
    #Can remove some libraries based on application
     set(CYTON_LIBRARIES
          ecConvertSimulation
          ecCytonHardwareInterface
          ecSystemSimulation
          ecSimulation
          ecConvertSystem
          ecRendCore
          ecVisualization
          ecFoundCommon
          ecFoundCore
          ecXml
          ecXmlReaderWriter
          ecManipulation
          ecManipulationDirector
          ecManipulator
          ecGeometry
          ecControl
          ecPathPlanning
          ecMatrixUtilities
          ecControlCore
          ecFunction
          ecPlugins
          ecRemoteCommand
    )
    • 下载cyton_gamma_1500_description
    • 接下来catkin_make
  • 相关阅读:
    Linux常用命令
    cookie机制、session机制
    http状态码、错误分析
    安装“Microsoft SQL Server 2014 Management Objects”时报错"Error Writing to file: Microsoft.SqlServer.XEvent.Linq.dll."
    Installshield build all installer in development computer
    C++使用RabbitMQ类库做客户端与RabbitMQ Server通讯,生成C++可调用的rabbimq.*.dll的过程
    由hibernate配置cascade而导致的软件错误,并分析解决此问题的过程
    由hibernate配置inverse="true"而导致的软件错误,并分析解决此问题的过程
    JVM原理解析
    Add lombok to IntelliJ IDEA
  • 原文地址:https://www.cnblogs.com/lizhensheng/p/11117742.html
Copyright © 2011-2022 走看看