No version for distro humble. Known supported distros are highlighted in the buttons above.
No version for distro iron. Known supported distros are highlighted in the buttons above.
No version for distro jazzy. Known supported distros are highlighted in the buttons above.
No version for distro rolling. Known supported distros are highlighted in the buttons above.
No version for distro noetic. Known supported distros are highlighted in the buttons above.
No version for distro ardent. Known supported distros are highlighted in the buttons above.
No version for distro bouncy. Known supported distros are highlighted in the buttons above.
No version for distro crystal. Known supported distros are highlighted in the buttons above.
No version for distro eloquent. Known supported distros are highlighted in the buttons above.
No version for distro dashing. Known supported distros are highlighted in the buttons above.
No version for distro galactic. Known supported distros are highlighted in the buttons above.
No version for distro foxy. Known supported distros are highlighted in the buttons above.
No version for distro lunar. Known supported distros are highlighted in the buttons above.
No version for distro jade. Known supported distros are highlighted in the buttons above.
No version for distro indigo. Known supported distros are highlighted in the buttons above.
No version for distro hydro. Known supported distros are highlighted in the buttons above.
Repository Summary
Checkout URI | https://github.com/seed-solutions/seed_smartactuator_sdk.git |
VCS Type | git |
VCS Version | master |
Last Updated | 2020-10-29 |
Dev Status | DEVELOPED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Packages
Name | Version |
---|---|
seed_smartactuator_sdk | 0.0.5 |
README
seed_smartactuator_sdk
サンプルコード
ROS上のパッケージから本ライブラリをインクルードし、SEED-Driverへコマンドを送信するための一連サンプルを示す。
本サンプルの概要は下記の通りである。
- シリアルポートを開く
- 原点復帰(キャリブレーション)が記述されたスクリプト1番を実行する
- スクリプトが終了するまで待機する
- 現在値取得を送信し続ける
なお、PCからSEED-Driverへ直接指令を行う際は通信モジュール(CM4U/CMSU)が必要となる。
通信モジュールの詳細はHP参照のこと。
多軸ロボットへ指令する際は、aero3_command.hを用いる。詳細は seed_r7_ros_controllerを参考にされたい
C++
#include <ros/ros.h>
#include "seed_smartactuator_sdk/seed3_command.h"
int main(int argc, char **argv)
{
ros::init(argc,argv,"cpp_sample_node");
ros::NodeHandle nh;
seed::controller::SeedCommand seed;
seed.openPort("/dev/ttyACM0",115200);
seed.openCom();
int id = 1;
std::array<int,3> motor_state;
seed.runScript(id,1);
seed.waitForScriptEnd(1);
while (ros::ok())
{
motor_state = seed.getPosition(id);
if(motor_state[0]) std::cout << motor_state[2] << std::endl;
}
return 0;
}
Python
#!/usr/bin/env python
import rospy
from seed_smartactuator_sdk.seed3_command import SeedCommand
#----------- main -----------------#
if __name__ == "__main__":
rospy.init_node('python_sample_node')
seed=SeedCommand()
seed.open_port("/dev/ttyACM0",115200)
seed.open_com()
id = 1
motor_state = []
seed.run_script(id,1)
seed.wait_for_script_end(1)
while not rospy.is_shutdown():
motor_state = seed.get_position(id)
if(motor_state[0]): print motor_state[2]
CONTRIBUTING
No CONTRIBUTING.md found.
Repository Summary
Checkout URI | https://github.com/seed-solutions/seed_smartactuator_sdk.git |
VCS Type | git |
VCS Version | master |
Last Updated | 2020-10-29 |
Dev Status | DEVELOPED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Packages
Name | Version |
---|---|
seed_smartactuator_sdk | 0.0.5 |
README
seed_smartactuator_sdk
サンプルコード
ROS上のパッケージから本ライブラリをインクルードし、SEED-Driverへコマンドを送信するための一連サンプルを示す。
本サンプルの概要は下記の通りである。
- シリアルポートを開く
- 原点復帰(キャリブレーション)が記述されたスクリプト1番を実行する
- スクリプトが終了するまで待機する
- 現在値取得を送信し続ける
なお、PCからSEED-Driverへ直接指令を行う際は通信モジュール(CM4U/CMSU)が必要となる。
通信モジュールの詳細はHP参照のこと。
多軸ロボットへ指令する際は、aero3_command.hを用いる。詳細は seed_r7_ros_controllerを参考にされたい
C++
#include <ros/ros.h>
#include "seed_smartactuator_sdk/seed3_command.h"
int main(int argc, char **argv)
{
ros::init(argc,argv,"cpp_sample_node");
ros::NodeHandle nh;
seed::controller::SeedCommand seed;
seed.openPort("/dev/ttyACM0",115200);
seed.openCom();
int id = 1;
std::array<int,3> motor_state;
seed.runScript(id,1);
seed.waitForScriptEnd(1);
while (ros::ok())
{
motor_state = seed.getPosition(id);
if(motor_state[0]) std::cout << motor_state[2] << std::endl;
}
return 0;
}
Python
#!/usr/bin/env python
import rospy
from seed_smartactuator_sdk.seed3_command import SeedCommand
#----------- main -----------------#
if __name__ == "__main__":
rospy.init_node('python_sample_node')
seed=SeedCommand()
seed.open_port("/dev/ttyACM0",115200)
seed.open_com()
id = 1
motor_state = []
seed.run_script(id,1)
seed.wait_for_script_end(1)
while not rospy.is_shutdown():
motor_state = seed.get_position(id)
if(motor_state[0]): print motor_state[2]
CONTRIBUTING
No CONTRIBUTING.md found.