1.0.3 • Published 1 year ago

robotic-view v1.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

RoboticView

A visual robotic arm control component written in Vuejs, with Vue2 support only.

Features

RoboticView allows the user to control the movement of the arm by mouse or touch, and its internal control logic is an inverse kinematic algorithm.

Usage

Installation

npm i robotic-view --S

Use in Vue

<template>
  <div class="demo">
    <robotic-arm-view />
    <robotic-palm-view />
  </div>
</template>

<script>
import { RoboticArmView, RoboticPalmView } from "robotic-view"
export default {
  name: 'robotic-view-demo',
  components: {RoboticArmView, RoboticPalmView }
}
</script>

<style scoped>
.demo{
  display: grid;
  grid-template-columns: 50% 50%;
}
</style>

Open Attributes

The open attributes supported by RoboticView are shown in the table below

RoboticArmView

ParametersDescriptionTypeAvailableDefault
showBordershow canvas borderBoolean-false
canvasWidthset canvas widthNumber-300
canvasHeightset canvas heightNumber-350
baseColorset arm base colorStringblack
jonitColorset joint colorStringbrown
leverColorset lever colorStringblack
endColorset endpoint colorStringaqua
jointRadiusset joint radiusNumber10
baseRadiusset base radiusNumber40
leverWidthset lever widthNumber15
isRosArmIn the case of ROS robots, the servo angle is not limitedBooleanfalse
withLabelshow each servo current angleBooleanfalse
textColorset angle text shown colorString#3CB371
fontStyleset angle test font styleString15px Arial
ikSolutionInverse kinematic algorithm solving approachStringleft, rightright
xTranslationThe overall offset of the control to the X-axisNumber0
yTranslationThe overall offset of the control to the Y-axisNumber0
isUpperArmWhether it is a three-link robot armBooleantrue, falsefalse
upperAngleIn the case of a three-link robot arm, the angle between the last link and the X-axis is precisely the parameter that needs to be set in order for the three-link robot arm to do the inverse kinematic calculationNumber45
scaleScaling factor to scale the overall controlNumber1

RoboticPalmView

ParametersDescriptionTypeAvailableDefault
showBordershow canvas borderBoolean-false
canvasWidthset canvas widthNumber-300
canvasHeightset canvas heightNumber-350
baseColorset arm base colorStringblack
jonitColorset joint colorStringbrown
leverColorset lever colorStringblack
endColorset endpoint colorStringaqua
middleLeverWidthset middle lever widthNumber20
leverWidthset lever widthNumber15
jointRadiusset joint radiusNumber10
withLabelshow each servo current angleBooleanfalse
textColorset angle text shown colorStringgreen
fontStyleset angle test font styleString15px Arial
xTranslationThe overall offset of the control to the X-axisNumber0
yTranslationThe overall offset of the control to the Y-axisNumber0
scaleScaling factor to scale the overall controlNumber1

Change Events

  • RoboticArmView
Event nameDescriptionCallback parameters
jointValueChangeAcquisition of the angle return data of the two-link robot arm{angle1: 0 , angle2: 0, angle3}
  • RoboticPalmView
Event nameDescriptionCallback parameters
palmValueChangeGet the angle at which the claw opens and closesangle