ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Motoman IO control service not advertised?

asked 2020-04-28 13:37:22 -0600

acbuynak gravatar image

Motoman FS100: Integrating IO Control Services Help

Hello! I'm trying to control the IO pins of an Motoman FS100 controller. Single-arm, single-robot group.

Issue: ROS services "readSingleIO" and "writeSingleIO" not appearing once launched and connected to robot controller.
Note: Other services like "robot_enable" are still available.

I don't know how to further troubleshoot this issue. Does anyone have any suggestions?

I am following user gvdhoorn's forked branch, "io_support_rebased" to edit my own fork of the motoman driver.

Versions
ROS Melodic
MotoROS v1.9.1

Code
Integrated IO over two commits:
1. adding ROS services
2. adding convenience class

Relevant Code from CMakeLists
from motoman_driver package/CMakeLists

add_executable(motoman_motion_streaming_interface_bswap
  src/joint_streaming_node.cpp
  src/joint_trajectory_streamer.cpp
  src/motion_ctrl.cpp
  src/motion_ctrl.cpp
  src/io_ctrl.cpp)


from motoman_msgs/CMakeLists

add_service_files(
  DIRECTORY
    srv
  FILES
    CmdJointTrajectoryEx.srv
    ReadSingleIO.srv
    WriteSingleIO.srv
)

Related Content:
ROS Answer: Control I/O of Generic Industrial robot
ROS Answer: Motoman Digital IO Control
Github: Commit for Multi-Robot I/O Read-Write
Google Forum: I/O Control of Motoman DX100

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-04-29 01:09:49 -0600

nd gravatar image

updated 2020-04-29 02:46:47 -0600

gvdhoorn gravatar image

you have to move these lines,

    // hacking this in here at this place
  io_ctrl_.init(connection);
  this->srv_read_single_io = this->node_.advertiseService("read_single_io",
      &MotomanJointTrajectoryStreamer::readSingleIoCB, this);
  this->srv_write_single_io = this->node_.advertiseService("write_single_io",
      &MotomanJointTrajectoryStreamer::writeSingleIoCB, this);

inside this method,

bool MotomanJointTrajectoryStreamer::init(SmplMsgConnection* connection, const std::vector<std::string> &joint_names,
    const std::map<std::string, double> &velocity_limits)
{
...
}
edit flag offensive delete link more

Comments

This worked! Thanks! To clarify for future reviewers, I mistakenly placed the io_ctrl initialization (first code quoted in above answer) into a similar looking bool group that performed a different function. After moving the placement of the code, everything worked as desired.

acbuynak gravatar image acbuynak  ( 2020-04-29 10:18:26 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2020-04-28 13:37:22 -0600

Seen: 224 times

Last updated: Apr 29 '20