Search found 22 matches
- 28 Nov 2024, 15:14
- Forum: General questions
- Topic: Custom ROS2 service to get Image
- Replies: 7
- Views: 498
Re: Custom ROS2 service to get Image
Hi, Today, I manage to solve my problem of writing a ROS2 service wich use a custom image message (to ask the service and receive an Image from a vision sensor). I've written a tutorial about ROS2 services and Coppelia. Here's the link https://docs.google.com/document/d/11fRG4yqm54YKTVXe0K6f1cc5qJe6...
- 20 Nov 2024, 16:36
- Forum: Bug reports
- Topic: Pb (bug?) with custom ROS2 service
- Replies: 1
- Views: 200
Pb (bug?) with custom ROS2 service
Hi, My goal is to create a ROS2 service to get the image from a vision sensor. To do this, I follow these steps : 1/ Publish a ROS2 message Image from an PNG file import rclpy from rclpy.node import Node import cv2 from cv_bridge import CvBridge from sensor_msgs.msg import Image class Publisher(Node...
- 18 Nov 2024, 10:20
- Forum: General questions
- Topic: Custom ROS2 service to get Image
- Replies: 7
- Views: 498
Re: Custom ROS2 service to get Image
OK, perfect. The only problem is that my scripts don't work at the moment. Most of the information (data, with, height, ...) are empty or equal to 0 so it means that my scripts (python and LUA) have errors. But I can't see what is wrong. The LUA script is an 'improvisation', I don't know this langua...
- 18 Nov 2024, 08:55
- Forum: General questions
- Topic: Custom ROS2 service to get Image
- Replies: 7
- Views: 498
Re: Custom ROS2 service to get Image
Hi, Using ROS2 service with Coppelia is a bit complicated (edition of interfaces.txt, compilation of libsimROS2.so, ...). Once the get image service is up and running, I propose to write a tutorial about how to write a ROS2 service for COppelia. Is there any recommendations for this (format : HTML o...
- 13 Nov 2024, 21:49
- Forum: General questions
- Topic: Custom ROS2 service to get Image
- Replies: 7
- Views: 498
Re: Custom ROS2 service to get Image
Hi, I don't know the LUA language but I try to translate the python script in LUA. Here's the LUA script : simROS2 = require('simROS2') sim=require'sim' function sysCall_init() visionSensor=sim.getObject('/visionSensor') print(visionSensor) corout=coroutine.create(coroutineMain) end function sysCall...
- 12 Nov 2024, 15:59
- Forum: General questions
- Topic: Custom ROS2 service to get Image
- Replies: 7
- Views: 498
Custom ROS2 service to get Image
Hi, With the help of responses from this topic (see https://forum.coppeliarobotics.com/viewtopic.php?t=10791 ), I can now create a AddFourInts.srv service message and use it in a Coppelia python threaded script. def sysCall_init(): sim = require('sim') simROS2 = require('simROS2') global srv sim.add...
- 11 Nov 2024, 17:47
- Forum: General questions
- Topic: How to create a custom service message
- Replies: 3
- Views: 397
Re: How to create a custom service message
Thank you for your response. I've added this line in the src/sim_ros2_interface/CMakeLists.txt file : # find dependencies find_package(tutorial_interfaces REQUIRED) Then, I've just try to compile the sim_ros2_interface with : ERBOSE=1 MAKEFLAGS=-j1 colcon build --symlink-install --event-handlers con...
- 09 Nov 2024, 23:13
- Forum: General questions
- Topic: How to create a custom service message
- Replies: 3
- Views: 397
How to create a custom service message
Hi, I've done the ROS2 tutorial on how to create a custom service message (see : https://docs.ros.org/en/humble/Tutorials/Beginner-Client-Libraries/Custom-ROS2-Interfaces.html). Now, in a terminal, I can check that this new message is recognized : ros2 interface show tutorial_interfaces/srv/AddThree...
- 09 Nov 2024, 18:23
- Forum: General questions
- Topic: Instability with ROS2 service
- Replies: 0
- Views: 287
Instability with ROS2 service
Hi, I've downloaded the service_server.ttt example ( https://github.com/CoppeliaRobotics/simROS2/blob/master/examples/service_server.ttt )to have an example of ROS2 service throw a LUA script. When I run this scene, I can see a new service : koala:~$ ros2 service list /add_two_ints and in a terminal...
- 02 Oct 2024, 18:23
- Forum: General questions
- Topic: ROS2, service and Python
- Replies: 1
- Views: 2731
ROS2, service and Python
Hi, I try to use ROS2 service with a UR5 robot. When I save/restart the Python script, I can see that the move_ur5 service exists ( ros2 service list displays it) and a button appears which says : '/UR5/Script : abort execution' but the 'run simulation button (the triangle)' is not accessible so I c...