@dlee Not exactly... I ended up switching to ROS1 and everything seems to be working just fine now. I still don't exactly understand why the topics were not being broadcasted over the network. I have been developing with ROS for just a couple years now but this is never something I have ever come across. I'm a little upset there was less help here / support for ROS2 given that the VOXL2 board is advertised as supporting ROS2, but perhaps we're still just missing something? Regardless EOL for ROS1 is still not for quite some time now and I suspect that it will continue to be supported for a while after as well so I don't thing developing in ROS1 is a "bad bet" necessarily. Open to hear thoughts on this from others as well though, I'm always learning and trying to increase my understanding!
Latest posts made by ggiacalone
-
RE: Failure to Ros2 topic echo messages from VOXL2 on my laptop using mpa-to-ros2
-
RE: Strange Turbulent Flight Behavior when transitioning into Offboard Mode (Please Help!!)
@Dawid-Mościcki Wow amazing I will give this a try very soon. Thank you so much!
-
Strange Turbulent Flight Behavior when transitioning into Offboard Mode (Please Help!!)
I am attempting to use my Sentinel drone with offboard control and I am running into some undesirable behaviors.
Here is a video that shows the behavior: https://www.youtube.com/watch?v=NoKqImDZU4A
This is the code I am running from my laptop while running the Mavros node on the Voxl 2.
#! /usr/bin/env python import rospy from geometry_msgs.msg import PoseStamped from mavros_msgs.msg import State from mavros_msgs.srv import CommandBool, CommandBoolRequest, SetMode, SetModeRequest current_state = State() def state_cb(msg): global current_state current_state = msg if __name__ == "__main__": rospy.init_node("offb_node_py") state_sub = rospy.Subscriber("mavros/state", State, callback = state_cb) local_pos_pub = rospy.Publisher("mavros/setpoint_position/local", PoseStamped, queue_size=10) rospy.wait_for_service("/mavros/cmd/arming") arming_client = rospy.ServiceProxy("mavros/cmd/arming", CommandBool) rospy.wait_for_service("/mavros/set_mode") set_mode_client = rospy.ServiceProxy("mavros/set_mode", SetMode) # Setpoint publishing MUST be faster than 2Hz rate = rospy.Rate(20) # Wait for Flight Controller connection while(not rospy.is_shutdown() and not current_state.connected): rate.sleep() initial_pose = PoseStamped() initial_pose.pose.position.x = 0 initial_pose.pose.position.y = 0 initial_pose.pose.position.z = 1.3 initial_pose.pose.orientation.x = 0.0 initial_pose.pose.orientation.y = 0.0 initial_pose.pose.orientation.z = -0.7071 initial_pose.pose.orientation.w = -0.7071 land_pose = PoseStamped() land_pose.pose.position.x = 0 land_pose.pose.position.y = 0 land_pose.pose.position.z = 0 land_pose.pose.orientation.x = 0.0 land_pose.pose.orientation.y = 0.0 land_pose.pose.orientation.z = -0.7071 land_pose.pose.orientation.w = -0.7071 flight_over = False # Variable to hold control timing for simple hop test # TODO replace with better controll later control_time_start = None # Send a few setpoints before starting for i in range(100): if(rospy.is_shutdown()): break local_pos_pub.publish(initial_pose) rate.sleep() offb_set_mode = SetModeRequest() offb_set_mode.custom_mode = 'OFFBOARD' arm_cmd = CommandBoolRequest() arm_cmd.value = True disarm_cmd = CommandBoolRequest() disarm_cmd.value = False last_req = rospy.Time.now() while(not rospy.is_shutdown()): if control_time_start is None: control_time_start = rospy.Time.now() if(current_state.mode != "OFFBOARD" and (rospy.Time.now() - last_req) > rospy.Duration(5.0)): if(set_mode_client.call(offb_set_mode).mode_sent == True): rospy.loginfo("OFFBOARD enabled") last_req = rospy.Time.now() else: if(not current_state.armed and (rospy.Time.now() - last_req) > rospy.Duration(5.0) and not flight_over): if(arming_client.call(arm_cmd).success == True): rospy.loginfo("Vehicle armed") last_req = rospy.Time.now() # Time Based Control for Hop Routine # TODO Make better later if (rospy.Time.now() - control_time_start) < rospy.Duration(15.0): local_pos_pub.publish(initial_pose) elif (rospy.Time.now() - control_time_start) < rospy.Duration(15.5): local_pos_pub.publish(land_pose) else: # Disarm the drone if(current_state.armed and (rospy.Time.now() - last_req) > rospy.Duration(5.0)): if(arming_client.call(disarm_cmd).success == True): rospy.loginfo("Vehicle Disarmed") last_req = rospy.Time.now() flight_over = True rate.sleep()
I am using this mavros code to control it to go to a predefined setpoint. Unfortunately, on the first flight of every power cycle, it has a little bit of turbulence and it bounces up and down and shakes in the air a little bit before quickly and accurately moving to the desired setpoint I commanded it to go to. If the flight finishes and I run the code on my computer again to rerun the flight, it executes perfectly with no oscillations or other issues. It almost looks like the drone is fighting with itself until it makes it's mind up about where it needs to go.
I also noticed that every time the drone powercycles, it thinks that its initial /mavros/local_position_pose has an orientation of approximately
initial_pose.pose.orientation.x = 0.0 initial_pose.pose.orientation.y = 0.0 initial_pose.pose.orientation.z = -0.7071 initial_pose.pose.orientation.w = -0.7071
hence why I ensure to include this point in my setpoint pose. Although, QVIO shows the correct "zeroed" pose.
Again, everytime I re run the code without turning the drone off and powering on again, it goes straight to the setpoint without any turbulence or shaking (except for the first flight) which makes me believe it's not an issue with the code.
Why might it be having this unexpected and unwelcomed behavior?
system-image: 1.7.4-M0054-14.1a-perf
kernel: #1 SMP PREEMPT Fri Feb 9 21:59:24 UTC 2024 4.19.125hw platform: M0054
mach.var: 1.0voxl-suite: 1.1.3-1
Service Name | Enabled | Running | CPU Usage
docker-autorun | Disabled | Not Running |
modallink-relink | Disabled | Not Running |
voxl-camera-server | Enabled | Running | 78.6%
voxl-cpu-monitor | Enabled | Running | 0.6%
voxl-dfs-server | Enabled | Running | 23.5%
voxl-feature-tracker | Disabled | Not Running |
voxl-flow-server | Disabled | Not Running |
voxl-imu-server | Enabled | Running | 5.7%
voxl-lepton-server | Disabled | Not Running |
voxl-mapper | Enabled | Running | 0.7%
voxl-mavcam-manager | Enabled | Running | 0.0%
voxl-mavlink-server | Enabled | Running | 3.4%
voxl-modem | Disabled | Not Running |
voxl-neopixel-manager | Disabled | Not Running |
voxl-open-vins-server | Disabled | Not Running |
voxl-portal | Enabled | Running | 0.2%
voxl-px4-imu-server | Disabled | Not Running |
voxl-px4 | Enabled | Running | 38.7%
voxl-qvio-server | Enabled | Running | 15.4%
voxl-rangefinder-server | Disabled | Not Running |
voxl-remote-id | Disabled | Not Running |
voxl-softap | Disabled | Not Running |
voxl-static-ip | Disabled | Not Running |
voxl-streamer | Enabled | Running | 0.0%
voxl-tag-detector | Disabled | Not Running |
voxl-tflite-server | Disabled | Not Running |
voxl-time-sync | Disabled | Not Running |
voxl-uvc-server | Disabled | Not Running |
voxl-vision-hub | Enabled | Running | 11.3%
voxl-wait-for-fs | Enabled | Completed | -
RE: No Depth Data
NEVERMIND! I resolved the issue. Just had to do a systemctl enable voxl-dfs-server and then powercycle the drone. Hope this helps anyone in the future.
-
No Depth Data
Hello, I am struggling to access pointcloud data from my newly purchased Sentinel Developer Drone.
If I go to the Voxl Web Portal and go to pointclouds -> voa_pc_out I see nothing.
/home/speeep/Pictures/Screenshots/Screenshot from 2024-04-02 10-47-14.png
Same with going to Mapper. Also blank.
/home/speeep/Pictures/Screenshots/Screenshot from 2024-04-02 10-48-09.png
If I ssh into the VOXL2 and run voxl-inspect-points tof_pc I will simply see "waiting for server at /run/mpa/tof_pc/".
If I do a voxl-inspect-services I see
file:///home/speeep/Pictures/Screenshots/Screenshot%20from%202024-04-02%2010-53-36.png
When I run roslaunch voxl_mpa_to_ros voxl_mpa_to_ros.launch and I try to run a rostopic hz /voa_pc_out it says "Interface voa_pc_out now publishing" but in the terminal when I ran the rostopic hz I see subscribed to [/voa_pc_out] and then "no new messages" printed again and again.
Do I just need to start a service or something to get pointcloud data?
It was my understanding that the sentinel drone should be able to produce pointcloud data to ros for mapping or at least be viewable from the Voxl portal so maybe I'm just missing something simple.
Thanks in advance!
-
QGC Not detecting Orqa Controller with UberLite-24 Ghost module
Hello,
I am trying to do the very first flight with my Sentinel Drone. Along with the drone, in the kit, I received an ORQA Controller with an ImmersionRC UberLite-24 Ghost module installed in the back.
The Controller seems to be bound with the receiver in the drone because when the controller is not on, the receiver's led is bright red, but when I turn the controller on, the led on the controller turns a greenish yellow color. This seems like a good sign.
I am connecting the drone to QGC over wifi and I can see that the gyro and camera feeds are visible to QGC in this way. Also a good sign. However, QGC tells me that I am "Not Ready" because I have no manual control input.
Additionally, when I go to the radio tab in QGC to try to calibrate the controller, I cannot see any responses from me manually moving the sticks on the controller.
I thought that these drones were flown before getting shipped out, so if this was the case, it should just work, right?
Do I need a Spektrum receiver to fly the drone? Perhaps I need a sim car to connect the drone with 5G? What am I missing here?
I haven't even done the first flight yet and I am stumped.
Any help would be greatly appreciated.
-
RE: Failure to Ros2 topic echo messages from VOXL2 on my laptop using mpa-to-ros2
Yes, multicast works between my laptop and the Voxl2.
However, when I run the mpa-to-ros2 node on the Voxl2, and then I do a ros2 topic list on my laptop there is no sign of the topics or messages being published over the network.
Here is a demo I just ran:
Step 1, Run mpa-to-ros2 on the Voxl2.
Step 2, do ros2 topic list on my machine and see nothing.
Step 3, confirm that the ros2 topics actually exist on the Voxl2 and that the mpa-to-ros2 node did not fail.
I just want access to the topics over ros via my laptop, shouldn't be so complicated. I'm still confused about how ros could be publishing topics and messages, however they are unreachable over the network despite mutlicast working, no firewalls being set up, correct ROS_DOMAIN_IDs set in the bashrc, etc. Could you help clarify on this and provide an example of code that helps to broadcast these topics and messages? @Zachary-Lowell-0
-
RE: Failure to Ros2 topic echo messages from VOXL2 on my laptop using mpa-to-ros2
@Moderator @Zachary-Lowell-0 Thanks for the new info! This totally makes sense. I do wish to still receive the data over ros2 on my laptop. Specifically, I want the time of flight Pointcloud2 messages and the qvio PoseStamped messages for performing mapping with code that will run externally to the Voxl2.
Could you provide a link or some reference to code somewhere that achieves this or something similar? I originally understood that the mpa-to-ros2 node would provide me with ros2 messages over the network. (@Zachary-Lowell-0 said in Failure to Ros2 topic echo messages from VOXL2 on my laptop using mpa-to-ros2:
If you wish to be able to view the ros2 topics on your personal computer outside the Voxl2 you need to implement a node or some other code that will take the ros topics onboard and blast them to your router to be distributed over your network)
Also, why would I not be able to at least do ros2 demo_nodes_py talker and listeners between my laptop and the voxl. Shouldn't that at least work? I couldn't even see the talker node running on the Voxl2 from my laptop. This seems concerning to me.
Lastly, Is ROS1 more easily useable compared to ROS2? I need to have certain functionalities working in a short timeframe and I would like to use the option that will realistically work the best.
-
RE: Failure to Ros2 topic echo messages from VOXL2 on my laptop using mpa-to-ros2
@Moderator I also found this result when running a ros2 wtf. I'm not sure if this is a bad sign but It definitely doesn't look good...
I did the following to install ROS2 Foxy on the Voxl2 according to @Zachary-Lowell-0 's response to another user who was having issues with the foxy install as well.
- sudo apt-get install voxl-ros2-foxy
- sudo apt-get install voxl-mpa-to-ros2
- voxl-configure-mpa-to-ros2
- source /opt/ros/foxy/mpa_to_ros2/install/setup.bash
- export ROS_HOME=/opt/foxy
- ros2 run voxl_mpa_to_ros2 voxl_mpa_to_ros2_node
Would love some support on this. Thanks in advance.
-
RE: Failure to Ros2 topic echo messages from VOXL2 on my laptop using mpa-to-ros2
@Moderator I was also able to pinpoint the issue to the Voxl2 because I am able to run talker and listener nodes to pass messages between my laptop and a teammate's laptop and I was also able to recreate the same communication issues with his laptop and the Voxl2. I am pretty sure this is a Voxl2 issue and not a ros2 issue. Any help on this would be greatly appreciated.