Closed mengchaoheng closed 1 year ago
after make px4_sitl gazebo
, :
parallels@ubuntu-linux-20-04-desktop:~/ros2_ws$ micro-ros-agent udp4 --port 8888
micro-ros-agent: command not found
can you provide some steps about the new ros2 bridge
@mengchaoheng You need https://github.com/micro-ROS/micro-ROS-Agent
You can either build it from source or install it using snap
@mengchaoheng You need https://github.com/micro-ROS/micro-ROS-Agent
You can either build it from source or install it using snap
Get it, by the way, how to build your offboard pkg? I'm a new user of ros. Can you please give me some details? @Jaeyoung-Lim
@mengchaoheng You can do colcon build with the package in the workspace
@mengchaoheng You can do colcon build with the package in the workspace
you did a good job, but when I build it on my computer, it failed. So I have to open this issue.
I want to an guidance like px4 user manual please
On my computer I can build px4_ros_com and px4_msg, except this px4_offboard
@mengchaoheng Sure, although unfortunately I wont have time to write a proper documentation for the next few days
why ros2 launch px4_offboard offboard_position_control.launch.py
didn't work? @Jaeyoung-Lim
@mengchaoheng You need https://github.com/PX4/px4_msgs in your ros2 workspace
@Jaeyoung-Lim still didn't work after add px4_msg
@mengchaoheng What does "didnt work" mean? Your log shows that the node is running.
What are you trying to do and the expected behavior?
didn't takeoff and rviz have nothing.
why didn't have this:
px4 , px4_msg and your offboard on main branch
I understand, I need to use qgc to control the plane to take off after executing the above three commands, and then switch offboard mode in qgc. Then he can have this effect. I think you've done an amazing job, but unfortunately it's not very friendly to new users. @Jaeyoung-Lim
To use this package in the future, I summarize the steps below:
It is best to sourcing the ROS2 installation by source /opt/ros/$ROS_DISTRO/setup.bash on all terminal.
open new terminal and cd to px4 path, run
make px4_sitl gazebo
Like micro-ros-tutorials, open new terminal and cd to microros_ws path, run
source install/local_setup.bash
ros2 run micro_ros_agent micro_ros_agent udp4 --port 8888
open new terminal and cd to ros2_ws path/src, clone px4-offboard and px4_msg pkg to src and cd to ros2_ws path, build them by colcon build
and run:
source install/setup.bash
ros2 launch px4_offboard offboard_position_control.launch.py
finally, take off and then switch offboard mode in qgc, or you can open qgc firstly to take off and then ros2 launch px4_offboard offboard_position_control.launch.py
, after that change the control mode to offboard.
@mengchaoheng You need to take off the vehicle and manually switch to offboard mode.
I am not sure if I understood correctly. Does it mean that it worked when you manually switched to offboard mode?
yes it work, thank you very much!
I understand, I need to use qgc to control the plane to take off after executing the above three commands, and then switch offboard mode in qgc. Then he can have this effect. I think you've done an amazing job, but unfortunately it's not very friendly to new users.
@mengchaoheng Thanks for the input, and trying out the package.
If you are willing to contribute back on the documentation, so that people can benefit from your experience, this would be much appreciated :grin:
@mengchaoheng I met the same issues as you. Thanks for your exhaustive explanation. It also works for me, even though I don't know the principle. @Jaeyoung-Lim Thank you and hope that the official tutorial is coming soon.
[INFO] [launch]: All log files can be found below /home/pokemon/.ros/log/2022-11-22-12-38-07-899328-pokemon-XiaoXinPro-16-IAH7-66689
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [visualizer-1]: process started with pid [66690]
[INFO] [offboard_control-2]: process started with pid [66692]
[INFO] [rviz2-3]: process started with pid [66694]
[rviz2-3] Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
[offboard_control-2] /opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/qos.py:307: UserWarning: ReliabilityPolicy.RMW_QOS_POLICY_RELIABILITY_BEST_EFFORT is deprecated. Use ReliabilityPolicy.BEST_EFFORT instead.
[offboard_control-2] warnings.warn(
[offboard_control-2] /opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/qos.py:307: UserWarning: DurabilityPolicy.RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL is deprecated. Use DurabilityPolicy.TRANSIENT_LOCAL instead.
[offboard_control-2] warnings.warn(
[offboard_control-2] /opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/qos.py:307: UserWarning: HistoryPolicy.RMW_QOS_POLICY_HISTORY_KEEP_LAST is deprecated. Use HistoryPolicy.KEEP_LAST instead.
[offboard_control-2] warnings.warn(
[rviz2-3] [INFO] [1669091888.148049293] [rviz2]: Stereo is NOT SUPPORTED
[rviz2-3] [INFO] [1669091888.148175165] [rviz2]: OpenGl version: 4.6 (GLSL 4.6)
[rviz2-3] [INFO] [1669091888.158227305] [rviz2]: Stereo is NOT SUPPORTED
[visualizer-1] /opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/qos.py:307: UserWarning: ReliabilityPolicy.RMW_QOS_POLICY_RELIABILITY_BEST_EFFORT is deprecated. Use ReliabilityPolicy.BEST_EFFORT instead.
[visualizer-1] warnings.warn(
[visualizer-1] /opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/qos.py:307: UserWarning: HistoryPolicy.RMW_QOS_POLICY_HISTORY_KEEP_LAST is deprecated. Use HistoryPolicy.KEEP_LAST instead.
[visualizer-1] warnings.warn(
[visualizer-1] Traceback (most recent call last):
[visualizer-1] File "/home/pokemon/test/install/px4_offboard/lib/px4_offboard/visualizer", line 33, in
when I run: ros2 launch px4_offboard offboard_position_control.launch.py This happened.What is the reason for this? I hope you can help me!
when I run:
ros2 launch px4_offboard offboard_position_control.launch.py
This happened.What is the reason for this? I hope you can help me!
@kukulinxin https://github.com/Jaeyoung-Lim/px4-offboard/issues/3#issuecomment-1296255696
I did the same as you except for the command: ros2 run micro_ros_agent micro_ros_agent udp4 --port 8888. Also I would like to ask: installation details of micro_ros_agent. Because I am installing it automatically when prompted that there is no micro_ros_agent.
I made it, thanks a million!