Problem with simROS2

Report crashes, strange behaviour, or apparent bugs
Post Reply
Valenorf
Posts: 21
Joined: 10 May 2017, 21:35

Problem with simROS2

Post by Valenorf »

Hello,

since the release of CoppeliaSim 4.5.1 and the rename of the module simExtROS2 to simROS2, I have the following problem with my scene at launch:
[/differential_drive/Hokuyo@childScript:error] 46: in simROS2.createPublisher@simExtROS2: Unsupported message type 'sensor_msgs/msg/LaserScan'. You may want to add it to meta/interfaces.txt and recompile the ROS2Interface plugin.
stack traceback:
[C]: in field 'createPublisher'
[string "/differential_drive/Hokuyo@childScript"]:46: in function 'sysCall_init'
[/differential_drive@childScript:error] 16: in simROS2.createSubscription@simExtROS2: Unsupported message type 'geometry_msgs/msg/Twist'. You may want to add it to meta/interfaces.txt and recompile the ROS2Interface plugin.
stack traceback:
[C]: in field 'createSubscription'
[string "/differential_drive@childScript"]:16: in function 'sysCall_init'
I added the two messages in the interfaces.txt file and recompiled. I don't think I'm doing something wrong here, since it was working normally in the past.

I'm uploading the scene:

https://github.com/giulioturrisi/Differ ... namics.ttt

Thanks,
Giulio

fferri
Posts: 1193
Joined: 09 Sep 2013, 19:28

Re: Problem with simROS2

Post by fferri »

Before recompiling, try removing the file libsimExtROS2.so from CoppeliaSim's directory

Valenorf
Posts: 21
Joined: 10 May 2017, 21:35

Re: Problem with simROS2

Post by Valenorf »

In that case, i obtain
[/RosInterfaceHelper@customizationScript:error] ROS2 interface was not found. Cannot run.
But I have the new file libsimROS2.so created compiling the simROS2 package in the CoppeliaSim directory.

Mildred34
Posts: 19
Joined: 12 May 2023, 16:03

Re: Problem with simROS2

Post by Mildred34 »

Definitely, the same problem as me. Looking forward to hearing fom you, if you have succeeded to correct that bug !

fferri
Posts: 1193
Joined: 09 Sep 2013, 19:28

Re: Problem with simROS2

Post by fferri »

Make sure that:
  • you installed libsimExtROS2.so into the CoppeliaSim's directory
  • you source the ROS2 environment (setup.sh / local_setup or similar) in the terminal where you would run CoppeliaSim
  • you checked plugin load message for errors

Valenorf
Posts: 21
Joined: 10 May 2017, 21:35

Re: Problem with simROS2

Post by Valenorf »

fferri wrote: 08 Jun 2023, 13:09 Make sure that:
  • you installed libsimExtROS2.so into the CoppeliaSim's directory
  • you source the ROS2 environment (setup.sh / local_setup or similar) in the terminal where you would run CoppeliaSim
  • you checked plugin load message for errors
1) when i compile the plugin, i obtain a new libsimROS2.so (not libsimExtROS2.so) in the folder. Checked deleting the old .so file everytime.
2) done
3) i don't have anymore any message regarding the load of the ros2 plugin in the terminal. Previously i had the message when it was working with Coppelia 4.4 and libsimExtROS2. Now nothing. I have only the error
ROS2 interface was not found. Cannot run.
inside coppelia.

I tried going back in the commit of simROS2 on github, still different problem arise. Now i will check if with coppelia 4.4 everything is ok.

fferri
Posts: 1193
Joined: 09 Sep 2013, 19:28

Re: Problem with simROS2

Post by fferri »

If building for CoppeliaSim 4.4 (or any other specific version) you have to checkout the corresponding git branch in the plugin repository, e.g. git checkout coppeliasim-v4.4.0-rev0

Valenorf
Posts: 21
Joined: 10 May 2017, 21:35

Re: Problem with simROS2

Post by Valenorf »

Coppelia 4.4 and branch coppeliasim-v4.4.0-rev0 works fine, I confirm.

Still no clue what's happening for the new Coppelia/latest commit of simROS2. Let me know if i can do some helpful debugging

fferri
Posts: 1193
Joined: 09 Sep 2013, 19:28

Re: Problem with simROS2

Post by fferri »

git HEAD is the development branch, usually it doesn't work with CoppeliaSim releases.

Post Reply