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

Custom Subscribe Issue (YOLO Application) #480

Open
3 tasks
ShawnZhou997 opened this issue Mar 10, 2025 · 2 comments
Open
3 tasks

Custom Subscribe Issue (YOLO Application) #480

ShawnZhou997 opened this issue Mar 10, 2025 · 2 comments
Labels

Comments

@ShawnZhou997
Copy link

  • I am at the right place and my issue is directly related to ROS#. General technical questions I would post e.g. at ROS Answers or Stack Overflow. For library-specific questions I would look for help in the corresponding library forums.
  • I have thoroughly read the Contributing Guideline and writing this issue is the right thing to do in my case.

  • I searched the Wiki, open and closed issues for an answer. I tried my best to find the answer by myself without success. I believe that the discussion we will have in this issue, and the solutions we might find, will help me, and likely other community members who have a similar problem.

Here is my question:

Hi, I'm trying to Sub a custom MessageType in Unity but end up in failure.

The terminal in Ubuntu shows:
2025-03-10 15:30:20+0800 [-] [ERROR] [1741591820.225644]: [Client 7] [id: /detection_result:0] subscribe: Unable to load the manifest for package RosSharpMessages. Caused by: RosSharpMessages

The MessageType content is
Image

My test script in Unity is

using RosSharp.RosBridgeClient;
using RosSharp.RosBridgeClient.MessageTypes;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace RosSharp.RosBridgeClient
{
    public class CustomDetectionSub : UnitySubscriber<MessageTypes.RosSharpMessages.DetectionResult>
    {
        public Vector3[] arucoLoc;
        public Vector3 baseLoc;
        public Vector3 asmObjLoc;
        public Vector3[] brickLocs;
        protected override void Start()
        {
            Topic = "/detection_result";
            arucoLoc = new Vector3[2];
            brickLocs = new Vector3[3];
            base.Start();
        }
        protected override void ReceiveMessage(MessageTypes.RosSharpMessages.DetectionResult msg)
        {
            Debug.Log(msg.class_name);
            if(msg.class_name == "aruco_0")
            {
                arucoLoc[0] = new Vector3((float)msg.x, (float)msg.y, (float)msg.z);
            }
            else if(msg.class_name == "aruco_1")
            {
                arucoLoc[1] = new Vector3((float)msg.x, (float)msg.y, (float)msg.z);
            }
            else if(msg.class_name == "base")
            {
                baseLoc = new Vector3((float)msg.x, (float)msg.y, (float)msg.z);
            }
            else if(msg.class_name == "asm obj")
            {
                asmObjLoc = new Vector3((float)msg.x, (float)msg.y, (float)msg.z);
            }
            else if(msg.class_name == "brick")
            {

            }
        }

    }
}

I've applied some other custom topics and the same issue showed never once.
Is there anything I've missed?

Thank you.

@ShawnZhou997
Copy link
Author

ShawnZhou997 commented Mar 10, 2025

By the way, there might be some BUGs in the extension UI.
No ‘Generate' button, as follows.
Image
Using Version ros-sharp1.7.1.

@ShawnZhou997
Copy link
Author

Refered to the pages as follows:
https://answers.ros.org/question/395708/
and
RobotWebTools/rosbridge_suite#415
Image
https://robotics.stackexchange.com/questions/60435/rosbridge-and-roslibjs-unable-to-load-the-manifest-for-package
Image
and others.

I've sourced the devel/setup.bash and problems still be there.

Maybe it is a common issue among rosbridges?

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

No branches or pull requests

1 participant