Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not getting factsheet when publishing instantAction factsheetRequest #11

Open
ainhoaarnaiz opened this issue Jun 20, 2023 · 5 comments
Open

Comments

@ainhoaarnaiz
Copy link

Hi,
I am trying to retrieve the factsheet of the turtlebot 3 because I would like to see an actual example of it. However, when publishing the instant action factsheetRequest, I get an error. I am unsure if I have added all the needed parameters and if they are correct:

{
"version": "2.0.0",
"manufacturer": "OSRF",
"serialNumber": "TB3_1",
"actions": [
{
"actionType": "factsheetRequest",
"actionId": "'$(cat /proc/sys/kernel/random/uuid)'",
"blockingType": "NONE",
"actionParameters": []
}
]
}

This is the error I get:
error

Any clue? Thank you very much!

@leandropineda
Copy link
Member

Hi @aarnaizl.

The factsheet should be published, see https://github.com/inorbit-ai/ros_amr_interop/blob/galactic-devel/vda5050_connector/vda5050_connector/vda5050_controller.py#L713. I think the issue is with the action ID. From the screenshot you shared I can see that the action id is '$(cat /proc/sys/kernel/random/uuid)', but it should be an UUID. Do you get the same error after fixing that?

@ainhoaarnaiz
Copy link
Author

Hi @leandropineda
So I have taken a closer look at the error and decided to change this part of the tb3_adapter.py from this:

self.supported_actions_srv = self.create_service(
SupportedActions,
base_interface_name + self._supported_actions_svc_srv,
lambda _: self.get_logger().info("Supported actions request"),
)

to this:

self.supported_actions_srv = self.create_service(
   srv_type=SupportedActions,
   srv_name=base_interface_name + self._supported_actions_svc_srv,
   callback=self.get_supported_actions_callback,
)

and created a simple callback function:

def get_supported_actions_callback(self, request, response):
    lambda _: self.get_logger().info("Supported actions request")
    return response

After fixing this, I have noticed that when factsheetRequest is published, the factsheet is not published in MQTT under the topic /uagv/v1/OSRF/TB3_1/factsheet or anything similar. Instead, I had previously run the command ros2 topic echo /uagv/v1/OSRF/TB3_1/factsheet on a new terminal and was able to see it there. Here is the output:

header_id: 1
timestamp: '2023-06-29T11:26:21.801Z'
version: 2.0.0
manufacturer: OSRF
serial_number: TB3_1
type_specification:
  series_name: robot_number
  series_description: ''
  agv_kinematic: OMNI
  agv_class: CARRIER
  max_load_mass: 0.0
  localization_types:
  - REFLECTOR
  navigation_types:
  - AUTONOMOUS
physical_parameters:
  speed_min: 0.0
  speed_max: 0.0
  acceleration_max: 0.0
  deceleration_max: 0.0
  height_min: 0.0
...

However, I am unsure if this is the expected output. Is it intended to publish the message only on the ROS2 topic /uagv/v1/OSRF/TB3_1/factsheet? Or should it also be published to MQTT?

Here is a screenshot of the execution (something similar happens with stateRequest):
Screenshot from 2023-06-29 14-05-38

@sampreets3
Copy link

Hi @leandropineda,

Do you have a sample factsheet JSON document? I would like to verify if my factsheet is a valid message or not.

Thanks!

@leandropineda
Copy link
Member

I don't @sampreets3 unfortunately. But I think you should be able to verify it by using any jsonschema validator and the schema provided on the standard

@sampreets3
Copy link

No problem, @leandropineda . It seems like a lot of applications don't yet make use of the factsheet. Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants