Open Ohaginia opened 1 year ago
Hi @Ohaginia ,
If you want to get the latest status of external input/output signal and internal signal, you can use type : deiver cmd: "get_signal [NUM]"
of khi_robot_command_service .
string type-> "driver" string cmd -> "get_signal [NUM]"
Please see this for details.
I tried this and it did not work.
rosservice call /khi_robot_command_service "type: 'driver'
cmd: 'get_signal [1]'"
The result is as follows
driver_ret: -4096
as_ret: 0
cmd_ret: "INVALID ARGS"
What is wrong?
"[" and "]" are not needed.
Could you execute as follows?
rosservice call /khi_robot_command_service "type: 'driver'
cmd: 'get_signal 1'"
Thank you very much. set_signal worked fine, but get_signal did not.
rosservice call /khi_robot_command_service "type: 'driver'
cmd: 'set_signal 1'"
driver_ret: 0
as_ret: 0
cmd_ret: ''
rosservice call /khi_robot_command_service "type: 'driver'
cmd: 'get_signal 1'"
driver_ret: -4097
as_ret: 0
cmd_ret: ''
rosservice call /khi_robot_command_service "type: 'driver'
cmd: 'set_signal -1'"
driver_ret: 0
as_ret: 0
cmd_ret: ''
rosservice call /khi_robot_command_service "type: 'driver'
cmd: 'get_signal 1'"
driver_ret: -4097
as_ret: 0
cmd_ret: ''
What is wrong?
Does the "-4097" error return after turning off/on the ROS-PC and the robot controller?
If it still happens , I would like to know the details. What is the software version of the controller? (You can check the version by Auxiliary function 0804 or Monitor command "ID".) And please let me know the terminal log of rs080n_bringup.launch when you get the "-4097" error.
Alternatively, you can also get the status of signal by type : as cmd: "type sig(1)"
instead of type : driver cmd: "get_signal 1"
.
It was confirmed that the same error occurs when the ROS-PC and controller power is turned on and off.
When I send "type : as cmd: "type sig(1)", I get a signal input instead of a signal state acquisition.
And after much thought, I succeeded in using this to get the state of the signal. type : as cmd: "type PRINT(SIG(1))"
Did you execute as follows?
rosservice call /khi_robot_command_service "type: 'as'
cmd: 'sig(1)'"
I think the following command can gets the status of output signal 1
correctly.
rosservice call /khi_robot_command_service "type: 'as'
cmd: 'type sig(1)'"
The following command works similarly.
rosservice call /khi_robot_command_service "type: 'as'
cmd: 'print sig(1)'"
How can I use the khi_robot_command service message to read the status of external and internal inputs and outputs?
I sent the following command, which returned an error message.
Terminal 1
Terminal 2