Executing Action/Goal over Roslib.js (WebSockets) #322
Replies: 2 comments 4 replies
-
I haven't used Roslib.js or rosbridge with actions, but the python syntax it is trying to use seems off. For example, the
I am not sure what is making the rosbridge look for |
Beta Was this translation helpful? Give feedback.
-
Given the linked ROS issue thread, the issue appears to be a general issue with using ROS lib.js with ros2 actions, not specific to create3. What is driving your requirement to use websockets? If you just need to use a web page, could you write a python webserver that could invoke the actions with rclpy? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I use the following command to rotate the Create3 robot.
ros2 action send_goal /rotate_angle irobot_create_msgs/action/RotateAngle "{angle: 1.57,max_rotation_speed: 0.5}"
This is working perfectly well through the terminal.
Now I want to execute the same through a Roslib.js (i.e. Websockets) for which I wrote the following web page.
**_The terminal for websocket shows the following error.
td-otis@td-otis:~$ ros2 launch rosbridge_server rosbridge_websocket_launch.xml
[INFO] [launch]: All log files can be found below /home/td-otis/.ros/log/2023-01-28-00-00-33-718123-td-otis-4856
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [rosbridge_websocket-1]: process started with pid [4858]
[INFO] [rosapi_node-2]: process started with pid [4860]
[rosbridge_websocket-1] [INFO] [1674844234.583450344] [rosbridge_websocket]: Rosbridge WebSocket server started on port 9090
[rosbridge_websocket-1] [INFO] [1674844245.684127991] [rosbridge_websocket]: Client connected. 1 clients total.
[rosbridge_websocket-1] [ERROR] [1674844245.749636686] [rosbridge_websocket]: [Client 13b1e924-ee4e-4428-ac54-fc2ec7648c3c] [id: advertise:/rotate_angle/goal:1] advertise: Unable to import msg class RotateAngleGoal from package irobot_create_msgs. Caused by module 'irobot_create_msgs.msg' has no attribute 'RotateAngleGoal'
[rosbridge_websocket-1] [INFO] [1674844245.757314874] [rosbridge_websocket]: [Client 13b1e924-ee4e-4428-ac54-fc2ec7648c3c] Subscribed to /rotate_angle/status
[rosbridge_websocket-1] [ERROR] [1674844245.758339606] [rosbridge_websocket]: [Client 13b1e924-ee4e-4428-ac54-fc2ec7648c3c] [id: subscribe:/rotate_angle/feedback:4] subscribe: Unable to import msg class RotateAngleFeedback from package irobot_create_msgs. Caused by module 'irobot_create_msgs.msg' has no attribute 'RotateAngleFeedback'
[rosbridge_websocket-1] [ERROR] [1674844245.759216402] [rosbridge_websocket]: [Client 13b1e924-ee4e-4428-ac54-fc2ec7648c3c] [id: subscribe:/rotate_angle/result:5] subscribe: Unable to import msg class RotateAngleResult from package irobot_create_msgs. Caused by module 'irobot_create_msgs.msg' has no attribute 'RotateAngleResult'
[rosbridge_websocket-1] [ERROR] [1674844245.759969995] [rosbridge_websocket]: [Client 13b1e924-ee4e-4428-ac54-fc2ec7648c3c] [id: publish:/rotate_angle/goal:6] publish: Cannot infer topic type for topic /rotate_angle/goal as it is not yet advertised_**
Can someone point out the correct code/servername/actionname etc?
Beta Was this translation helpful? Give feedback.
All reactions