Hi,
We are currently working on integrating manual image acquisitions with an Intel RealSense D435i camera, controlled with the Logitech controller provided with the Panther. I am having trouble getting the LED bumper lights to do what I want.
As I understand, I need to call the service panther/lights/controller/set/animation to do so. I tried calling the service from terminal, and when I run :
ros2 service call /panther/lights/controller/set/animation panther_msgs/srv/SetLEDAnimation "{animation: {id: 0, param: ''}, repeating: true}"
on the Raspberry Pi I get the expected result. However, I don’t see the link between section panther_lights of the documentation and the command I used to switch the animation on the Raspberry Pi. The doc suggests ros2 service call /lights/set_animation [...]
which hangs on “waiting for service to become available…”.
The bigger issue is, I don’t fully understand the behavior of the user computer that is connected to the same LAN as the Raspberry Pi. If I run the same command as above, I get “The passed service type is invalid”. This suggests that I should program and run server and client nodes on the user computer, but I find it kind of strange since the service is running on the Raspberry Pi aka on the LAN.
Could you help ? I did check that both computer are on the LAN and hear each other with the “robot network” Husarion example and it works as expected.
Hello @Arnaudb,
Thank you for bringing this issue to our attention. I’ll address your concerns below.
1. Controlling Lights from the User Computer
The issue you’re encountering is likely due to a missing panther_msgs
message definition. To resolve this, you’ll need to build and source the panther_msgs package on your user computer. Please ensure the following to avoid further issues:
- The version (tag) of
panther_msgs
should match the version running in the compose.yaml
file on the Raspberry Pi (RPI).
- Make sure the DDS configuration is identical. By default, the Panther driver uses
RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
.
- Ensure proper time synchronization. You can find more details on how to configure time synchronization here: Time Synchronization Guide.
2. API Changes
With the release of the Beta version, some API changes were introduced:
- Before Beta: The service was named
lights/controller/set/animation
.
- In Beta: The service name changed to
lights/set_animation
Don’t forget to add for namespaces if necessary.
You can check the documentation on GitHub for your specific version by selecting the appropriate tag.
3. Setting Custom Animations
You can also add custom animations. For detailed information on how to configure custom animations, please refer to the panther_lights README.
Let me know if this resolves your issue or if you have any further questions.
Best regards,
Hi @RafalGorecki,
Thanks for the quick answer.
API changes
It somehow did not cross my mind to check for updates but now that it is pointed out, it seems very obvious. Thanks for the heads up.
Custom animations
Thanks for the reminder. For now I would be happy just to be able to use the default animations !
Controlling Lights from the User Computer
I already figured it was related to the srv and msg definition files and had already tried something to no avail. Here I cloned panther_msgs to the user computer, git checkout
the appropriate tag (2.0.4), built and sourced. It still does not work as expected.
When running :
ros2 service call /panther/lights/controller/set/animation panther_msgs/srv/SetLEDAnimation "{animation: {id: 5, param: ''}, repeating: false}"
the terminal hangs on the following:
requester: making request: panther_msgs.srv.SetLEDAnimation_Request(animation=panther_msgs.msg.LEDAnimation(id=5, param=''), repeating=False)
which is admittedly a step in the right direction.
When I run the same command on the RPi, I get the expected result (the requester output, the response and the bumper LED light displays the animation).
I’m affraid I will be requiring some more help on this point. I guess as long as I can’t call the service from the user computer terminal, it would be difficult to do so from a custom ROS package.
Best,
Arnaud
Hello @Arnaudb,
Did you set the DDS configuration to rmw-cyclonedds-cpp
before starting the service? If not, this may be the problem you are having. To fix this:
-
Make sure that the appropriate package is installed.
sudo apt install ros-$ROS_DISTRO-rmw-cyclonedds-cpp
-
Before using ROS 2, execute the command
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
and then call the service:
ros2 service call /panther/lights/controller/set/animation panther_msgs/srv/SetLEDAnimation "{animation: {id: 5, param: ''}, repeating: false}"
You can add this command to .bashrc
file, so that you don’t have to remember it.
Let me know if this solved the problem.
Hi @RafalGorecki ,
I did not pay enough attention to this very important info.
Now all works as planned and I am happy to say : merge request about to be closed ! This topic can be marked as solved as far as I’m concerned
You’ve been a great help, thank you.
1 Like
Thank you @Arnaudb, for your confirmation, I am closing the case.