-
Notifications
You must be signed in to change notification settings - Fork 569
Closed
Labels
Description
Description
- Library Version: ros2
- ROS Version: humble
- Platform / OS: MacOs / ubuntu22.04
Steps To Reproduce
when i use roslibjs to send a action goal ,rosbridge-suit gets an error and tried to find action interface in the msg packages.
action(serverName, actionName, argument) {
const rosAction = new ROSLIB.ActionClient({
ros: this.ros,
serverName: serverName,
actionName: actionName
})
const goal = new ROSLIB.Goal({
actionClient: rosAction,
goalMessage: argument
});
// Print out their output into the terminal.
goal.on('feedback', function (feedback) {
console.log('Feedback: ' + feedback.sequence);
});
goal.on('result', function (result) {
console.log('Final Result: ' + result.sequence);
});
goal.send()
}
And I tried to use python to send the action, and I got the same error
import roslibpy
import roslibpy.actionlib
import time
def feedback_callback(feedback):
print('Feedback received: ', feedback['sequence'])
def result_callback(result):
print('Result received: ', result['sequence'])
def call_fibonacci_action(order):
client = roslibpy.Ros(host='10.211.55.5', port=9090)
client.run()
action_client = roslibpy.actionlib.ActionClient(client, '/fibonacci', 'actionlib_tutorials/Fibonacci')
goal = roslibpy.actionlib.Goal(action_client, roslibpy.Message({'order': order}))
goal.on('feedback', feedback_callback)
goal.on('result', result_callback)
print('Sending goal...')
goal.send()
# 等待结果
while not goal.is_finished:
time.sleep(1)
print('Goal processing done.')
client.terminate()
if __name__ == '__main__':
call_fibonacci_action(5)