Unable to echo ros2 topic from drone to a computer
-
Hello, I was trying to use subscribe to ros2 topics from drone to my computer. I can see the ros2 topics lists from drone on to the computer. But when it try to use ros2 topic echo command from computer I am getting following error.
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_allocIf I use echo on drone I can see topics printing. but can't do it on computer. can anyone help me with this.
-
Hey @Aniruddha,
Thanks for reaching out, could you provide more information about your setup and how things are communicating? -
@ApoorvThapliyal, Hi, I set ros domain id on both drone and the pc. they are connected it through the access point. I can ping both drone and pc from one and another and I can even connect drone to qgroundcontrol. That is why I am thinking it might be the ros side issue. I also check for micro dds agent and it was enable and running. I have setup the static ip on drone. I added following command in /etc/dhcpcd.conf file
interface wlan0
static ip_address=192.168.x.xx/24
static routers=192.168.x.xx
static domain_name_servers=8.8.8.8Let me know if you need anything else you need.
-
Hey @Aniruddha
As I understand it, you are able to see the topics on your computer but cant echo them. Which topic are you trying to echo so I can try to recreate it on my end? -
@ApoorvThapliyal I was trying to echo /imu_apps
-
@ApoorvThapliyal I forgot to mention that the error occurred on drone side for voxl_mpa_to_ros2_node. While on computer it is not printing anything
-
Hey @Aniruddha
I tried recreating the issue on my setup using a Starling V2 Max connected to my computer over Wi-Fi. On my end, I’m able to echo ROS 2 topics both on the drone and from the computer without any issues. I even added the same static IP configuration you used, and I was still able to echo my topics without any errors.You also mentioned seeing an error on the drone side for the voxl_mpa_to_ros2_node, could you clarify what the exact error is? Are you unable to run ros2 topic echo directly on the drone as well, or is the problem only when echoing from your computer? Additionally, which drone model are you using?
-
