Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Unable to convert call argument to Python object when using ros2 topic echo /fmu/vehicle_local_position/out #162

Open
mad0x60 opened this issue Oct 10, 2022 · 1 comment

Comments

@mad0x60
Copy link
Contributor

mad0x60 commented Oct 10, 2022

Ubuntu 22.04, ROS2 humble, PX4 sitl

I am using px4_ros_com and px4_msgs to build the the bridge between px4 and ROS2. I enabled the messages that I am interested in (vehicle_global_postition and vehicle_local_position on the PX4 side and used the script to generate the urtps_bridge_topics.yaml file on the agent side. After building the bridge and PX4 and starting simulation, I can only echo the vehicle_global_position topic. However, when I try to echo the /fmu/vehicle_local_position/out topic I get the following error.

A message was lost!!!
	total count change:1
	total count: 1---
Unable to convert call argument to Python object

When I try to echo again, I get only:
Unable to convert call argument to Python object

The vehicle_local_position message is the last message that is enable in the yml file that defines the topics

The workaround to this is to export PYTHONOPTIMIZE=1 before running the ros2 echo command

@stevehenderson
Copy link

I also had this issue with the same setup for several of the topics (I was able to view /fmu/out/vehicle_odometry, but not others), and the workaround from @mad0x60 fixed things.

Ubuntu 22.04
ROS2
PX4 sitl
Python 3.10

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants