1.0.8 • Published 3 years ago

react-robotic-view v1.0.8

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

react-robotic-view

A visual robotic arm control component written in reactjs.

Features

react-robotic-view 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

yarn add react-robotic-view

Use in React

import { RoboticArmView, RoboticPalmView } from "react-robotic-view"

render() {
        return (
            <div className="demo">
                <RoboticArmView}/>
                <RoboticPalmView/>
            </div>
        )
    }
// css
.demo{
  display: grid;
  grid-template-columns: 50% 50%;
}

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

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

Change Events

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

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago