Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

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

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

  1. fruffers


    Nov 23, 2020
    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


    Aug 8, 2020
    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.