Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Thursday, June 8, for a Q&A with Unity's Content Pipeline group here on the forum, and on the Unity Discord, and discuss topics around Content Build, Import Workflows, Asset Database, and Addressables!
    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.