No version for distro dashing. 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 bouncy. Known supported distros are highlighted in the buttons above.
No version for distro melodic. Known supported distros are highlighted in the buttons above.

seed_smartactuator_sdk package from seed_smartactuator_sdk repo

seed_smartactuator_sdk

Package Summary

Tags No category tags.
Version 0.0.3
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/seed-solutions/seed_smartactuator_sdk.git
VCS Type git
VCS Version master
Last Updated 2019-08-09
Dev Status DEVELOPED
Released RELEASED

Package Description

The seed_smartactuator_sdk package

Additional Links

No additional links.

Maintainers

  • Yasuto Shiigi

Authors

No additional authors.

seed_smartactuator_sdk

サンプルコード

ROS上のパッケージから本ライブラリをインクルードし、SEED-Driverへコマンドを送信するための一連サンプルを示す。
なお、本サンプルの概要は下記の通りである。 1. シリアルポートを開く 2. 原点復帰(キャリブレーション)が記述されたスクリプト1番を実行する 3. スクリプトが終了するまで待機する 4. 現在値取得を送信し続ける

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_solutions_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]

CHANGELOG

Changelog for package seed_smartactuator_sdk

0.0.2 (2019-07-24)

  • Merge pull request #6 from seed-solutions/development repositry name changed
  • name changed
  • README fixed
  • update
  • package name changed
  • Update README.md
  • Merge pull request #5 from k-okada/add_travis add .travis.yml
  • Merge pull request #4 from k-okada/master

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Package Dependencies

Deps Name
1 catkin

System Dependencies

Name
boost

Dependant Packages

No known dependants.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged seed_smartactuator_sdk at answers.ros.org

No version for distro ardent. 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.