Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Cube not changing colour from ROS-TCP-CONNECTOR tutorials.

Discussion in 'Robotics' started by fruffers, Mar 10, 2023.

  1. fruffers

    fruffers

    Joined:
    Nov 23, 2020
    Posts:
    5
    I have followed the tutorials for ROS2 connection to Unity and everything works, the connection is fine. The publisher I think is working and the cube is spinning. The colour message is send over the ROS2 network from the python demo but my cube in Unity does not change colour. I attached the script to it and made reference to the cube in it. But it does not change colour. Any idea why this is? Many thanks!! :>
     
  2. Envilon

    Envilon

    Joined:
    Aug 8, 2020
    Posts:
    55
    Did you use some logging to verify that Unity has definitely received the message and the callback function in Unity has been called? It would help to narrow down the scope of the issue.

    Also, have you tried sending messages from ROS multiple times? If I remember correctly, when I did this tutorial, I had some similar issues in that the color change did not occur in the first few seconds after I started the application in the editor. I tried sending the message multiple times, and then the color changed. Every following message after that changed the color without any issues.