question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Part4 : "Error : Failed to resolve message name: list index out of range"

See original GitHub issue

Hello.

I finished parts 0~3 of Pick-and-Place tutorials using Ubuntu18.04 PC. Now I am trying to do Part 4 with my real Niryo One, but I am having trouble getting errors and don’t know what to do.

I connected my PC to Niryo One via Ethernet on Ubuntu. I launched Niryo One Studio, got the calibration done, and then executed the Unity scene. Both simulated Niryo One and real Niryo One didn’t move. The errors are as below.

[After I pressed Play in part 4 Unity scene]

  • Unity side Screenshot from 2021-11-12 22-59-25
SysCommand.subscribe - Unknown message class ''
UnityEngine.Debug:LogError (object)
Unity.Robotics.ROSTCPConnector.ROSConnection:ReceiveSysCommand (string,string) (at Library/PackageCache/com.unity.robotics.ros-tcp-connector@7f055108f4/Runtime/TcpConnector/ROSConnection.cs:633)
Unity.Robotics.ROSTCPConnector.ROSConnection:Update () (at Library/PackageCache/com.unity.robotics.ros-tcp-connector@7f055108f4/Runtime/TcpConnector/ROSConnection.cs:578)
  • ROS side Screenshot from 2021-11-12 22-59-13 [ERROR] [1636725544.585528]: Failed to resolve message name: list index out of range

[After I pressed “publish” button in playing the scene]

  • ROS side No change from above.

  • Unity side Screenshot from 2021-11-12 23-20-06

Exception: No registered publisher on topic sim_real_pnp for type niryo_moveit/MoverService!
Unity.Robotics.ROSTCPConnector.ROSConnection.Publish (System.String rosTopicName, Unity.Robotics.ROSTCPConnector.MessageGeneration.Message message) (at Library/PackageCache/com.unity.robotics.ros-tcp-connector@7f055108f4/Runtime/TcpConnector/ROSConnection.cs:956)
RealSimPickAndPlace.PublishJoints () (at Assets/RealSimPickAndPlace.cs:136)
UnityEngine.Events.InvokableCall.Invoke () (at /home/bokken/buildslave/unity/build/Runtime/Export/UnityEvent/UnityEvent.cs:180)
UnityEngine.Events.UnityEvent.Invoke () (at /home/bokken/buildslave/unity/build/Runtime/Export/UnityEvent/UnityEvent/UnityEvent_0.cs:58)
UnityEngine.UI.Button.Press () (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/UI/Core/Button.cs:70)
UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/UI/Core/Button.cs:114)
UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/ExecuteEvents.cs:57)
UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/ExecuteEvents.cs:272)
UnityEngine.EventSystems.EventSystem:Update() (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/EventSystem.cs:501)

I commented out one line in “Real Sim Pick And Place” script as below, and the result changed; playing the unity scene itself doesn’t cause an error (Pressing “Publish” Button still causes errors.)

Screenshot from 2021-11-13 00-40-24 commented out: Screenshot from 2021-11-13 00-40-41

[Before pressing “Publish” button]

  • Unity side & ROS side No errors.

[After pressing “Publish” button]

  • Unity side Screenshot from 2021-11-13 01-08-58
Exception: No registered publisher on topic sim_real_pnp for type niryo_moveit/MoverService!
Unity.Robotics.ROSTCPConnector.ROSConnection.Publish (System.String rosTopicName, Unity.Robotics.ROSTCPConnector.MessageGeneration.Message message) (at Library/PackageCache/com.unity.robotics.ros-tcp-connector@7f055108f4/Runtime/TcpConnector/ROSConnection.cs:956)
RealSimPickAndPlace.PublishJoints () (at Assets/RealSimPickAndPlace.cs:136)
UnityEngine.Events.InvokableCall.Invoke () (at /home/bokken/buildslave/unity/build/Runtime/Export/UnityEvent/UnityEvent.cs:180)
UnityEngine.Events.UnityEvent.Invoke () (at /home/bokken/buildslave/unity/build/Runtime/Export/UnityEvent/UnityEvent/UnityEvent_0.cs:58)
UnityEngine.UI.Button.Press () (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/UI/Core/Button.cs:70)
UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/UI/Core/Button.cs:114)
UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/ExecuteEvents.cs:57)
UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/ExecuteEvents.cs:272)
UnityEngine.EventSystems.EventSystem:Update() (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/EventSystem.cs:501)
  • ROS side: No change Screenshot from 2021-11-13 01-11-27

After that, I added “Debug.Log()” code in the “Start()” and “ExecuteRobotCommands()” functions as below.

Screenshot from 2021-11-13 01-45-51Screenshot from 2021-11-13 01-46-22 [The result] Screenshot from 2021-11-13 01-52-23

Log 1 appeared but Log 2 didn’t. It seems that the program went wrong before ExecuteRobotCommands() was called.

Environment

Linux PC with Unity (not virtual machine)

  • Ubuntu 18.04.6 LTS
  • Unity Hub 2.4.5 (for Linux)
  • Unity 2021.1.26f1
  • Niryo One Studio for Linux
  • (ROS Melodic)
  • (Docker : but not used in part4)

real Niryo One (Raspberry Pi 3)

  • Ubuntu 16.04.7 LTS
  • ROS kinetic
  • niryo_moveit & ros_tcp_endpoint packages (to home/niryo/catkin_ws/src directory)
  • Contents of the home/niryo/catkin_ws/src directory are as below Screenshot from 2021-11-13 00-17-05

Actually, I also tried with Windows PC (& Unity for Windows) connected to Niryo One via wi-fi network, and the result was the same… Do you have any idea what should I do ?

Thank you for reading.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
sdiaocommented, Nov 15, 2021

Hi @zarumo , thanks for reaching out and sharing the detailed logs. We are currently investigating the issue and will keep you posted.

0reactions
vidurvij-Unitycommented, Feb 6, 2022

AIRO-1571 is resolved

Read more comments on GitHub >

github_iconTop Results From Across the Web

List Index Out of Range – Python Error Message Solved
You'll get the Indexerror: list index out of range error when iterating through a list and trying to access an item that doesn't...
Read more >
Does "IndexError: list index out of range" when trying to ...
'list index out of range' most likely means you are referring to n-th element of the list, while the length of the list...
Read more >
How to fix an IndexError in Python
The only solution to fix the IndexError: list index out of range error is to ensure that the item you access from a...
Read more >
List Index Out of Range in Python (Solved - Easy Fix)
This error occurs when you try to access an index of a list that goes beyond its maximum length. Since lists in Python...
Read more >
list index out of range” when trying to run my code. What ...
This error basically means you are trying to access a value at a List index which is out of bounds i.e greater than...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found