//获取当前参数
currentParameter = () => {
let network = new Networking();
let sub = network.listen('/joint_states','sensor_msgs/JointState',(name , data) => {
this.setState({
inputValue1: Math.floor( 180/(Math.PI)*data.position[0] * 10)/10,
inputValue2: Math.floor( 180/(Math.PI)*data.position[1] * 10)/10,
inputValue3: Math.floor( 180/(Math.PI)*data.position[2] * 10)/10,
inputValue4: Math.floor( 180/(Math.PI)*data.position[3] * 10)/10,
inputValue5: Math.floor( 180/(Math.PI)*data.position[4] * 10)/10,
inputValue6: Math.floor( 180/(Math.PI)*data.position[5] * 10)/10,
})
sub.unsubscribe();
console.log("data.position",data.position)
});
}
获取gauss机械臂的当前状态
最新推荐文章于 2024-10-21 16:47:15 发布