PX4 / px4_ros_com

ROS2/ROS interface with PX4 through a Fast-RTPS bridge
http://px4.io
BSD 3-Clause "New" or "Revised" License
143 stars 167 forks source link

sensor_combined_listener does not print out message contents. #45

Closed AndyBlightLeeds closed 4 years ago

AndyBlightLeeds commented 4 years ago

I have built and run the sensor_combined_listener example on this page https://dev.px4.io/master/en/middleware/micrortps.html. Everything builds and runs but this is the only output I get from the sensor_combined_listener:

ros2 launch px4_ros_com sensor_combined_listener.launch.py
[INFO] [launch]: All log files can be found below /home/andy/.ros/log/2020-06-11-09-21-17-147249-andy-Precision-7510-26498
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [sensor_combined_listener-1]: process started with pid [26510]
[sensor_combined_listener-1] Starting sensor_combined listener node...

The setup I am using is:

I started the apps as follows:

Terminal 1. Start gazebo SITL using:

cd ~/git/PX4/Firmware
make px4_sitl_rtps gazebo

After the usual first time run delay, an iris copter is displayed on an ashpalt ground plane being shown in Gazebo.

Terminal 2. Start the client using:

cd ~/git/PX4/Firmware
./build/px4_sitl_rtps/bin/px4-micrortps_client start -t UDP

px4-micrortps_client is a symbolic link to px4. The px4 daemon is started with the command make px4_sitl_rtps gazebo.

Terminal 3. Start the agent using:

 . /opt/ros/eloquent/setup.bash
~/px4/ros_com/install/px4_ros_com/bin/micrortps_agent -t UDP

Terminal 4. Start the combined listener example.

cd ~/px4/ros_com/
. install/local_setup.bash
ros2 launch px4_ros_com sensor_combined_listener.launch.py

You should see regular updates but nothing is every printed.

I then tried using ros2 topic echo /SensorCombined_PubSubTopic but this produced an error message:

Cannot echo topic '/SensorCombined_PubSubTopic', as it contains more than one type: [px4_msgs::msg::SensorCombined, px4_msgs/msg/SensorCombined]

This looks like it is the same problem reported in #35.

TSC21 commented 4 years ago

@AndyBlightLeeds on the documentation it is explicit that the required Fast-RTPS-Gen version required is 1.0.4. What you are seeing above is a result of something that was solved already in this version.

AndyBlightLeeds commented 4 years ago

Thanks for pointing out my error. After rebuilding and installing fastrtpsgen v1.0.4, this problem has gone.