Some examples using DroneKit and Python to fly the DJI drones...

##Two somewhat complex example that works is this:
At the moment I do not use TimeLining for absolute motion, so the drone will fly somewhat strange, as the PID in RosettaDrone2 is not tuned, this will be fixed, but there are some yaw issues I need, that complicate things.
HOWEVER, all the motion functionality is supposed to work.
The goal is that everything you can do with QGC or DroneKit and a Mavlink based drone, you should be able to do with any DJI-Mobile SDK supported drone.
All the Mavproxy and other Mavlink tools work.
ALWAYS test with Ardupilot SITL first, then with RosettaDrone2...
Send a velocity command with +x being NOTRH of the drone.
def send_global_ned_velocity(self, vx, vy, vz, yaw):
msg = self.vehicle.message_factory.set_position_target_global_int_encode(
0,  # time_boot_ms (not used)
0, 0,  # target system, target component
mavutil.mavlink.MAV_FRAME_GLOBAL_RELATIVE_ALT_INT,  # frame
0b0000011111000111,  # type_mask (only speeds enabled)
0, 0, 0,  # x, y, z positions (not used)
vx, vy, vz,  # N, E, D velocity in m/s
0, 0, 0,  # x, y, z acceleration (not supported yet, ignored in GCS_Mavlink)
0,float(yaw))  # yaw, yaw_rate (not supported yet, ignored in GCS_Mavlink)
self.vehicle.send_mavlink(msg)
# Send a velocity command with +x being the heading of the drone.
# For the RosettaDrone/DJI we can use yaw_rate... but then we breake Adupilot/PX4 compatibility...
def send_local_velocity(self, vx, vy, vz,yaw):
    msg = self.vehicle.message_factory.set_position_target_local_ned_encode(
        0,
        0, 0,
        mavutil.mavlink.MAV_FRAME_BODY_OFFSET_NED,
        0b0000011111000111, # Following ( 1 is mask OUT): yaw vel, yaw pos, force not accell, az,ay,ax, vz,vy,vx, pz,py,px
        0, 0, 0,
        vx, vy, vz, # speed forward, right, down...
        0, 0, 0,
        0,float(yaw))  # yaw rate in radians/s...
    self.vehicle.send_mavlink(msg)
    self.vehicle.flush()

PS: If you use the GOTO function in QGC you MIST move more than 50cm or it will ignore the command (a DJI thing).

This might sound trivial but could you make a basic tutorial for this ? once you have rosetta drone working and are able to do a QGC mission, where would i start to use this? my goal is to add a python VoiceBot to automatically handle take off, landing, and assignment of missions.

I will, I am working on mission plans from QGC now, the goal is to have this working before Christmas.

On 7 Dec 2020, at 22:07, danammeansbear<EMAIL_ADDRESS>wrote:
This might sound trivial but could you make a basic tutorial for this ? once you have rosetta drone working and are able to do a QGC mission, where would i start to use this? my goal is to add a python VoiceBot to automatically handle take off, landing, and assignment of missions.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/The1only/rosettadrone/issues/36#issuecomment-740180408, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABS7SLFUGSRYHQDWRGKKJODSTU7ZZANCNFSM4UMVFFPQ.

Thanks @The1only ,it's a very useful tutorial on controlling drone using python.
Could you add an even simpler case: change arming status and takeoff the drone ?
We are trying to take off the drone using command line (with mavlink & mavros) but keep getting error, so are considering use python to solve the problem.
Best,
-- Luke

All the information about using the Python DroneKit to control RosettaDrone2 is here:
https://dronekit-python.readthedocs.io/en/latest/
It will eventually be 100% Mavlink compatible, so wether you fly DJI or a Mavlink drone it should be the same.
There are some limitations at the moment, but work in progress.

Ahhhh I know you're problem, you MUST unlock the system ( for safety) hitt the small lock button up on the right side, when it is white, THEN you can take off....  Just to prevent accidental takeoffs.

Hi All,
following a very simple python script that connects to RosettaDrone and print out some vehicle parameters:
Usage:
python rosetta_drone.py --connect=udp:your_gcs_ip_address:14550
your_gcs_ip_address is the address of the computer where the script is running
I'll post also a more complex script with some commands like takeoff , starting a mission and so on
Ciao
/Luca
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from dronekit import connect, VehicleMode
import time
import argparse
import datetime

#Set up option parsing to get connection string                                                                                $parser = argparse.ArgumentParser(description='Print out vehicle state information. Connects to SITL on local PC by default.')
parser.add_argument('--connect',
                   help="vehicle connection target string. If not specified, exit.")
parser.add_argument('--uavid',
                   help="vehicle id. If not specified, exit.")
args = parser.parse_args()

connection_string = args.connect
connection_drone_id = args.uavid
sitl = None

#Start SITL if no connection string specified
if not connection_string or not connection_drone_id:
        print("Pls specify the connect parameters (--connect)")
        exit()

# Connect to the Vehicle.
#   Set `wait_ready=True` to ensure default attributes are populated before `connect()` returns.
print("\nConnecting to vehicle on: %s" % connection_string)
vehicle = connect(connection_string, wait_ready=True)

cmds = vehicle.commands
cmds.download()
cmds.wait_ready()

vehicle.wait_ready('autopilot_version')

##########
# Start
##########
while True:
        print vehicle.battery.level
        print vehicle.system_status.state
        print vehicle.armed
        print vehicle.heading
        print vehicle.groundspeed
        print vehicle.gps_0.fix_type
        print vehicle.gps_0.satellites_visible
        print vehicle.location.global_frame.lat
        print vehicle.location.global_frame.lon
        print vehicle.location.global_frame.alt
        print vehicle.heading
        print vehicle.groundspeed
        print vehicle.velocity[2]
        print vehicle.home_location.lat
        print vehicle.home_location.lon
        print vehicle.home_location.alt
        print vehicle.commands.next
        print vehicle.commands.count

Perfekt, I work round the clock to get the mission planning working. The conversion from Mavlink to DJI and back is almost ready.

This is awesome 👌
On Thu, Dec 17, 2020, 1:52 PM Terje<EMAIL_ADDRESS>wrote:

Perfekt, I work round the clock to get the mission planning working. The
conversion from Mavlink to DJI and back is almost ready.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/The1only/rosettadrone/issues/36#issuecomment-747630755,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AHJKTGNMBWGCTBXURHGSIMTSVJHQFANCNFSM4UMVFFPQ
.

Perfekt, I work round the clock to get the mission planning working. The conversion from Mavlink to DJI and back is almost ready.

Awesome!!!

We are stuck in change mode from Stabilize to GUIDED. (by using the command vehicle.mode = VehicleMode("GUIDED"))
But it doesn't work to our DJI mini.
To our knowledge, drone can not be armable without going to GUIDED mode.
Is there anyway to set the mode to GUIDED, maybe inside rosettadrone ?
Hope to hear your expertise.
Best,
-- Luke

If I remember right the DJI drone switches automatically on a takeoff command from mavlink, ignore the error and continue to takeoff. But RosettaDrone expect 'P' mode on the controller (Mavic 2 Pro), and you must click on the "lock" so it becomes white NOT geeen before issuing the command.On Dec 18, 2020 21:15, lukelu0520<EMAIL_ADDRESS>wrote:
We are stuck in change mode from Stabilize to GUIDED. (by using the command vehicle.mode = VehicleMode("GUIDED"))
But it doesn't work to our DJI mini.
To our knowledge, drone can not be armable without going to GUIDED mode.
Is there anyway to set the mode to GUIDED, maybe inside rosettadrone ?
Hope to hear your expertise.
Best,
-- Luke
—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or unsubscribe.

Thanks for your persistently kind help, @The1only . By ignore mode chage, armable, arm check, we are able to takeoff !
To help more newbie folks, we paste the simple takeoff script below:
===
#Ignore Mode / Arms, directly takeoff to targetAltitude.
#Advice: better to remove drone propellers before executing the script !

from dronekit import connect
import time
vehicle = connect('udpin:hostip:port', wait_ready=True)
vehicle.wait_ready('autopilot_version')
targetAltitude = 1.5
vehicle.simple_takeoff(targetAltitude)
while True:
    print(" Altitude: ", vehicle.location.global_relative_frame.alt)
    if vehicle.location.global_relative_frame.alt>=aTargetAltitude*0.95:
        print "Reached target altitude"
        break
    time.sleep(1)

PS: remember that if you hit the SIM button on startup you can take off and fly like this without actually taking off. The SIM button enables the built inn DJI HITL module.

Nice to know the feature !
BTW, was wondering if you know how to construct a mavlink msg for LANDING ? So far we know it may requres:
mavutil.mavlink.MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, mavutil.mavlink.MAV_CMD_NAV_LAND
inside the mavlink packet.

def return_home_and_land(self):
    # Send Drone home and land...
    print("Waiting for drone to enter RTL flight mode")
    self.vehicle.mode = VehicleMode("RTL")
    time.sleep(5)
    while not self.vehicle.mode.name == 'RTL':
        time.sleep(0.5)

    print("Waiting for drone to return to landing")
    while self.vehicle.armed is True:
        print("Current Altitude: %f" % self.vehicle.location.global_relative_frame.alt)
        time.sleep(1.0)

    print("Landed...")

def land(self):
    print("Now let's land")
    self.vehicle.mode = VehicleMode("LAND")
    time.sleep(5)

    print("Waiting for landing")
    while self.vehicle.mode == 'LAND' and self.vehicle.armed is True:
        print("Current Altitude: %f" % self.vehicle.location.global_relative_frame.alt)
        time.sleep(1)

    print("Landed...")

In QGC you can also point and click on the location you want the drone to "goto" and it will.

The problem we met is set VehicleMode doesn't take effect. We've tested multiple VehicleMode such as GUIDED, LAND, but none of them is successfully set.
Alternatively, vehicle.send_mavlink(msg) works.
So we were wondering if there is another way to command LAND.
Best,
-- Luke

Hmm strange I have been using this code for over one year now without issues. Let me look into it.

Thanks for your prompt reply.
In the meantime, we will also log the behavior inside doInBackground of MainActivity.java.
Hope to print out msg_cmd.command for the analysis.

It's allready there, just select the LOGCAT windows and enter MAV in the text window and select Verbose...
You will the see all you're commands.

We found that MAV_CMD_DO_SET_MODE (176) doesn't take effectiveness.
The mavlink msg is:
sysid:255 compid:0 param1:1.0 param2:9.0 param3:0.0 param4:0.0 param5:0.0 param6:0.0 param7:0.0 command:176 target_system:1 target_component:0 confirmation:0
And Rosetta Drone execute: changeFlightMode((int) msg_cmd.param1);
Should we use msg_cmd.param1 or we should use msg_cmd.param2 ?   msg_cmd.param2 is 9, which seems matches LAND code better.

Could you provide a short test case that creates this problem?
As you know there are two different MAVlink commands for changing the mode, both end up doing the same.
Maybe there is something there. The long command 176 uses parameter 1, the command 11 uses parameter 2.
https://mavlink.io/en/messages/common.html

The python code of dronekit is below. VehicleMode("LAND") send command 176 to RosettaDrone, and  RosettaDrone uses command 176 to do the case MAV_CMD_DO_SET_MODE, and then changeFlightMode((int) msg_cmd.param2) needs to use to set proper mode for RosettaDrone.
The long command is: sysid:255 compid:0 param1:1.0 param2:9.0 param3:0.0 param4:0.0 param5:0.0 param6:0.0 param7:0.0 command:176 target_system:1 target_component:0 confirmation:0
Not sure why LAND parameter (9.0) is not put in param 1. It's put in 2 for Custom Mode.
    def land(self):
        print("Now let's land")
        self.vehicle.mode = VehicleMode("LAND")
        time.sleep(5)

        print("Waiting for landing")
        while self.vehicle.mode == 'LAND' and self.vehicle.armed is True:
            print("Current Altitude: %f" % self.vehicle.location.global_relative_frame.alt)
            time.sleep(1)

        print("Landed...")

You are on to something, thank you.
On my MAC with all the latest modules, I get the same issue as you, that is, the Mode change command uses parameter 2, as it should. When I change the code to use parameter 2 rather than 1 then all the mode changes work again and I can take off and land.
However on my main Linux system that pulled modules 6 months ago. I need to use parameter 1.
I will check the DroneKit issue list, they may have fixed this.
Greate catch...

I used a setup from a Udemy class years ago...
I will check-in the fix and update all my systems.

If you check out the “Work” branch it is fixed.
I now uses Parameter 2 and can confirm it works on my MAC with all the latest.
But now it’s a problem on older systems.

Thanks for your fix, @The1only !
We are working on velocity control, regards to your example "Send a velocity command with +x being the heading of the drone." on the top of the discussion thread:
What is int(x10000000), int(y10000000), float(z) ?  Our python can not recognize x10000000 and y10000000.
And the line: speed, speed, 1.0, # x, y, z velocity in m/s, why you give 1.0 m/s for the z direction ?
Best,
-- Luke

We're experiencing the same issues:
from python script, we're able to takeoff and go to specified lat,lon
We've also an issue with goto command, the altitude will change to 1.2m
We're unable to issue command like RTL or LAND too

Hmm We just fixed RTL did we not???
I installed everything fresh yesterday evening and it was working just fine.
It seems some DroneKit versions uses parameter 1 and some uses the correct parameter 2
Sorry for the bad example, I updated it now.

I must recompile Rosetta Drone?

To get the latest fixes YES, we will not update master until Waypoint flying is working.

OR you can just patch this:
                case MAV_CMD_DO_SET_MODE:
                    changeFlightMode((int) msg_cmd.param2);
                    break;

Ahh the GOTO command Altitude was also fixed some time back.
Maybe you should just upgrade to the "Work" patch.
Then you will also get DJI SDK 4.14 ( the brand new open)

Compiled with the work branch and SDK 4.14
Now RTH and LAND commands are ok
TAKEOFF it's OK
but the previous GOTO command (from python) does not work anymore
Still testing
BTW I cannot use GOTO from QGCS

OK thank you I will fix.
Can you send the Python code you use for the GOTO?

Arm and takeoff
arm_and_takeoff(7) <-- OK
time.sleep(5)
print("Going towards first point for 30 seconds ...")
vehicle.mode = VehicleMode("GUIDED")
point1 = LocationGlobalRelative(41.932030,  12.631848, 5)
point2 = LocationGlobalRelative(41.932327,  12.631982, 5)
vehicle.simple_goto(point1)
time.sleep(20)
vehicle.simple_goto(point2)
time.sleep(20)
print("Returning to Launch")
vehicle.mode = VehicleMode("RTL") <-- OK

Perfect, never tested that command. Give me an hour...

Take your time, thank you
With the master branch, the GOTO command worked with the altitude issue

Let me know which command you use for guided

OK This is part of a DJI issue that any mission MUST have two or more waypoints.
To fix this we use a trap, but somehow this fails now. I'll fix it.
I use another GOTO built from MAVlink Long command, but this is better so just way until I can test and verify my fix.

I do not have a system to test on, but I belive I fixed the GOTO, and also added support for the old MissionItem/goto command that some still use...

Tested the updated work branch:
1 - simple_goto() dronekit function works as expected (altitude/heading ok)
2 - loading WPs (mission) from QGCS works as expected (mission)  (1)
3 - GOTO from QGCS works as expected (2)
Note:

After loading all the WPs, QGCS returns an error regarding the last ACK not correctly received but the mission was uploaded correctly
after sending from QGCS the GOTO command it returns an error but the command it's executed normally

I'll post some screenshots and python code later

that's the error after uploading waypoint (the mission works correctly)

That is a known error I will fix it after I get the waypoint download to work (read back from the drone).On Dec 22, 2020 17:57, ADPM Drones<EMAIL_ADDRESS>wrote:
that's the error after uploading waypoint (the mission works correctly)
—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or unsubscribe.

That is a known error I will fix it after I get the waypoint download to work (read back from the drone).On Dec 22, 2020 17:57, ADPM Drones<EMAIL_ADDRESS>wrote: that's the error after uploading waypoint (the mission works correctly) —You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or unsubscribe.

Thanks!!!
The same happens when using GOTO from QGCS

After some testing, we have reached a very reliable interaction between DJI and Mavlink (dronekit) scripts.
TakeOff, Landing, Brake, RTH, GOTO everything works fine from dronekit/python.
We need to test the mission loading and execution via dronekit/python.
We have also developed a REST API interface for getting the telemetry and send the commands to Rosetta Drone
More on this later

Look forward to a rest api  example or two.Marry Christmas.

Can't wait for this!
On Wed, Dec 23, 2020, 4:29 PM Terje<EMAIL_ADDRESS>wrote:

Look forward to a rest api  example or two.Marry Christmas.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/The1only/rosettadrone/issues/36#issuecomment-750481191,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AHJKTGM3EL2OZ6VUKYHLG4DSWJOM3ANCNFSM4UMVFFPQ
.

Following an example of reading UAV data and publish them in a JSON format via HTTP:
#!/usr/bin/env python
-- coding: utf-8 --
"""
© Copyright 2019-2020, ADPM Drones.
Get  status from REST API (https://XXXXXXXXXXX)
vehicle status in JSON format returned:
{
"status": {
"status": "ACTIVE",
"lastReachedWaypointId": 3,
"name": "Drone ACME",
"uavId": "1",
"timestamp": "2020-12-13T07:18:34.867608+00:00",
"EKF_status": true,
"groundSpeedMetersPerSecond": 4.983015060424805,
"is_armable": true,
"heading": 274,
"batteryRemainingPercent": 0,
"lat": 99.729751,
"alt": 591.88,
"verticalSpeedMetersPerSecond": 0,
"satellites": 10,
"lng": 88.3460402,
"armed": true,
"fixType": 6,
"channel": "LTE",
"FlightMode": "AUTO"
},
"command": "HEARTBEAT"
}
"""
from future import print_function
from dronekit import connect, VehicleMode
import time
import requests
import json
import datetime
import os
import pytz
"""
Set up option parsing to get connection string
"""
import argparse
parser = argparse.ArgumentParser(description="Read out vehicle state information and publich in JSON format.")
parser.add_argument("--connect",
help="vehicle connection target string.")
args = parser.parse_args()
connection_string = args.connect
"""
Connect to the Vehicle.
Set wait_ready=True to ensure default attributes are populated before connect() returns.
"""
print("\nConnecting to vehicle on: %s" % connection_string)
while True:
try:
vehicle = connect(connection_string, wait_ready=True)
except:
print ("Some Dronekit error")
"""
Retry connection
"""
continue
# if everything ok proceed
break
vehicle.wait_ready("autopilot_version")
"""
Get all vehicle attributes (state)
"""
print("\nGet all vehicle attribute values:")
print(" Global Location: %s" % vehicle.location.global_frame)
print(" Global Location (relative altitude): %s" % vehicle.location.global_relative_frame)
print(" Local Location: %s" % vehicle.location.local_frame)
print(" Attitude: %s" % vehicle.attitude)
print(" Velocity: %s" % vehicle.velocity)
print(" GPS: %s" % vehicle.gps_0)
print(" Battery: %s" % vehicle.battery)
print(" EKF OK?: %s" % vehicle.ekf_ok)
print(" Last Heartbeat: %s" % vehicle.last_heartbeat)
print(" Heading: %s" % vehicle.heading)
print(" Is Armable?: %s" % vehicle.is_armable)
print(" System status: %s" % vehicle.system_status.state)
print(" Groundspeed: %s" % vehicle.groundspeed)    # settable
print(" Airspeed: %s" % vehicle.airspeed)    # settable
print(" Mode: %s" % vehicle.mode.name)    # settable
print(" Armed: %s" % vehicle.armed)    # settable
drone_id = 1
channel = "LTE"
path = "/home/yyyyyyyyy/"
print("Vehicle tracking info process running...")
try:
while True:
d = datetime.datetime.now(tz=pytz.utc).isoformat()
my_json = {
"command": "HEARTBEAT",
"status":
{
"name": "Drone ACME",
"uavId": str(drone_id),
"timestamp" : d,
"channel" : channel,
"status": vehicle.system_status.state,
"is_armable": vehicle.is_armable,
"armed": vehicle.armed,
"batteryRemainingPercent": vehicle.battery.level,
"fixType": vehicle.gps_0.fix_type,
"satellites": vehicle.gps_0.satellites_visible,
"lat": vehicle.location.global_frame.lat,
"lng": vehicle.location.global_frame.lon,
"alt": vehicle.location.global_frame.alt,
"heading": vehicle.heading,
"groundSpeedMetersPerSecond": vehicle.groundspeed,
"verticalSpeedMetersPerSecond" : vehicle.velocity[2],
"lastReachedWaypointId": vehicle.commands.next,
"FlightMode": vehicle.mode.name,
"EKF_status": vehicle.ekf_ok
}
}
	with open(path + "pos.json", "w") as json_file:
		json.dump(my_json, json_file, indent = 4)
	os.system("sudo mv " + path + "pos.json /var/www/html/xxxxxxxxx/index.html")
	#json_file.close()
	time.sleep(0.1)

except:
print("An exception occurred")
pass
"""
dummy data on exit
so it"s possible to check for no data coming from vehicle
"""
d = datetime.datetime.now(tz=pytz.utc).isoformat()
my_json = {
"command": "HEARTBEAT",
"status":
{
"name": "Drone ACME",
"uavId": str(drone_id),
"timestamp" : d,
"channel" : channel,
"status": None,
"is_armable": None,
"armed": None,
"batteryRemainingPercent": None,
"fixType": None,
"satellites": None,
"lat": None,
"lng": None,
"alt": None,
"heading": None,
"groundSpeedMetersPerSecond": None,
"verticalSpeedMetersPerSecond" : None,
"lastReachedWaypointId": None,
"FlightMode": None,
"EKF_status": None
}
}
with open(path + "pos.json", "w") as json_file:
json.dump(my_json, json_file, indent = 4)
os.system("sudo mv " + path + "pos.json /var/www/html/xxxxxxxxxx/index.html")
json_file.close()
"""
Close vehicle object before exiting script
"""
print("\nClose vehicle object")
vehicle.close()
print("Completed")

For public webhook endpoints, I use http://www.webhook.site
Very powerful!!!!

https://github.com/patrickelectric/mavlink2rest

https://github.com/patrickelectric/mavlink2rest

Good catch!!!
Thanks!!!

Tested right now with Rosetta Drone (mav2rest)

If it works, give the guy a feedback, and we get more attention also to our project.

If it works, give the guy a feedback, and we get more attention also to our project.

Already done!

In this tread they mention POST also, did you test that?
https://discuss.ardupilot.org/t/mavlink-to-rest-api/51660

Ps: I have also tested the Mavproxy, it also works. Most interesting is the abillity to split Mavlink streams, and the command line GCS.

Ps: I have also tested the Mavproxy, it also works. Moust interesting is the abillity to split Mavlink streams, and the command line GCS.

I used mavproxy too for splitting mavlink stream to qgcs and my REST API scripts

In this tread they mention POST also, did you test that?
https://discuss.ardupilot.org/t/mavlink-to-rest-api/51660

I've tested sending RTH change mode (the same I use in my python script) but Rosetta Drone does not respond
{
"header": {
"system_id": 1,
"component_id": 1,
"sequence": 0
},
"message": {
"type":"COMMAND_LONG",
"param1":1.0,
"param2":6.0,"param3":0.0,"param4":0.0,"param5":0.0,"param6":0.0,"param7":0.0,
"command":{
"type":"MAV_CMD_DO_SET_MODE"
},
"target_system":0,
"target_component":0,
"confirmation":0
}
}

Does anyone have an idea how to map out a polygon mission based around a center point EX. creating a rectangle mission pattern based on current or assigned position
I have this script i use to get the distance of one point to another
'
R = 6373.0
radius of the Earth
lat1 = math.radians(52.2296756)
coordinates
lon1 = math.radians(21.0122287)
lat2 = math.radians(52.406374)
lon2 = math.radians(16.9251681)
dlon = lon2 - lon1
change in coordinates
dlat = lat2 - lat1
a = math.sin(dlat / 2)**2 + math.cos(lat1) * math.cos(lat2) * math.sin(dlon / 2)**2
Haversine formula
c = 2 * math.atan2(math.sqrt(a), math.sqrt(1 - a))
distance = R * c
print(distance)
OUTPUT
278.54558935106695
'
and this algorithm with the help of my teacher to get the cordinates of an unknown point give then distance.
The formula is
x2=x1+d×cosθ,y2=y1+d×sinθ,
d = the distance from (x1,x2) to (y1,y2).
How would i algorithmically compute a polygon and assign cordinates to the points of it? sorta like how mission planner does this but command line format

Does anyone have an idea how to map out a polygon mission based around a center point EX. creating a rectangle mission pattern based on current or assigned position
I have this script i use to get the distance of one point to another
'
R = 6373.0
radius of the Earth
lat1 = math.radians(52.2296756)
coordinates
lon1 = math.radians(21.0122287)
lat2 = math.radians(52.406374)
lon2 = math.radians(16.9251681)
dlon = lon2 - lon1
change in coordinates
dlat = lat2 - lat1
a = math.sin(dlat / 2)**2 + math.cos(lat1) * math.cos(lat2) * math.sin(dlon / 2)**2
Haversine formula
c = 2 * math.atan2(math.sqrt(a), math.sqrt(1 - a))
distance = R * c
print(distance)
OUTPUT
278.54558935106695
'
and this algorithm with the help of my teacher to get the cordinates of an unknown point give then distance.
The formula is
x2=x1+d×cosθ,y2=y1+d×sinθ,
d = the distance from (x1,x2) to (y1,y2).
How would i algorithmically compute a polygon and assign cordinates to the points of it? sorta like how mission planner does this but command line format

Nice project, If you look in the example tab in this discussion group, you will find examples on python takeoff, goto, rtk and land, just what you need.
I will make a manual/wikki at some time, but now I got no time.

Nice project, If you look in the example tab in this discussion group, you will find examples on python takeoff, goto, rtk and land, just what you need.
I will make a manual/wikki at some time, but now I got no time.

Try the Work branch, it got some nice fixes.
If you got problems I’ll jump right at it.
Best regard
Terje Nilsen
9Tek AS
Norway

On Dec 21, 2020, at 17:01, ADPM Drones<EMAIL_ADDRESS>wrote:

Take your time, thank you
With the master branch, the GOTO command worked with the altitude issue
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.

Try the Work branch, it got some nice fixes.
If you got problems I’ll jump right at it.
Best regard
Terje Nilsen
9Tek AS
Norway

On Dec 21, 2020, at 17:01, ADPM Drones<EMAIL_ADDRESS>wrote:

Take your time, thank you
With the master branch, the GOTO command worked with the altitude issue
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.

Just use takeoff goto(lat lon) rtl()
It’s all described in the DeonKit for python manual by 3DR.
Best regard
Terje Nilsen
9Tek AS
Norway

On Jan 13, 2021, at 18:46, danammeansbear<EMAIL_ADDRESS>wrote:

Does anyone have an idea how to map out a polygon mission based around a center point EX. creating a rectangle mission pattern based on current or assigned position
I have this script i use to get the distance of one point to another
'
R = 6373.0
radius of the Earth
lat1 = math.radians(52.2296756)
coordinates
lon1 = math.radians(21.0122287)
lat2 = math.radians(52.406374)
lon2 = math.radians(16.9251681)
dlon = lon2 - lon1
change in coordinates
dlat = lat2 - lat1
a = math.sin(dlat / 2)**2 + math.cos(lat1) * math.cos(lat2) * math.sin(dlon / 2)**2
Haversine formula
c = 2 * math.atan2(math.sqrt(a), math.sqrt(1 - a))
distance = R * c
print(distance)
OUTPUT
278.54558935106695
'
and this algorithm with the help of my teacher to get the cordinates of an unknown point give then distance.
The formula is
x2=x1+d×cosθ,y2=y1+d×sinθ,
d = the distance from (x1,x2) to (y1,y2).
How would i algorithmically compute a polygon and assign cordinates to the points of it? sorta like how mission planner does this but command line format
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.

Just use takeoff goto(lat lon) rtl()
It’s all described in the DeonKit for python manual by 3DR.
Best regard
Terje Nilsen
9Tek AS
Norway

On Jan 13, 2021, at 18:46, danammeansbear<EMAIL_ADDRESS>wrote:

Does anyone have an idea how to map out a polygon mission based around a center point EX. creating a rectangle mission pattern based on current or assigned position
I have this script i use to get the distance of one point to another
'
R = 6373.0
radius of the Earth
lat1 = math.radians(52.2296756)
coordinates
lon1 = math.radians(21.0122287)
lat2 = math.radians(52.406374)
lon2 = math.radians(16.9251681)
dlon = lon2 - lon1
change in coordinates
dlat = lat2 - lat1
a = math.sin(dlat / 2)**2 + math.cos(lat1) * math.cos(lat2) * math.sin(dlon / 2)**2
Haversine formula
c = 2 * math.atan2(math.sqrt(a), math.sqrt(1 - a))
distance = R * c
print(distance)
OUTPUT
278.54558935106695
'
and this algorithm with the help of my teacher to get the cordinates of an unknown point give then distance.
The formula is
x2=x1+d×cosθ,y2=y1+d×sinθ,
d = the distance from (x1,x2) to (y1,y2).
How would i algorithmically compute a polygon and assign cordinates to the points of it? sorta like how mission planner does this but command line format
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.

Dear Dronekit friends,
We are trying to use DroneKit's Gimbal function to change the pitch of gimbal, but not very sure if it is compatible with rosettadrone.
I was wondering if someone tried DroneKit to control camera gimbal. Hope to know what kind of DJI model works.
-- Luke

Dear Dronekit friends,
We are trying to use DroneKit's Gimbal function to change the pitch of gimbal, but not very sure if it is compatible with rosettadrone.
I was wondering if someone tried DroneKit to control camera gimbal. Hope to know what kind of DJI model works.
-- Luke

No, you have to use Dronekit servo functions. As described in the readme cannel 8 and 9 if I remember right. However send me a Dronekit code example and I will make it work.

No, you have to use Dronekit servo functions. As described in the readme cannel 8 and 9 if I remember right. However send me a Dronekit code example and I will make it work.

Great tips @The1only ! We do find below important lines in MAVLinkReceiver which can map to DroneKit Servo control
case MAV_CMD_DO_SET_SERVO:
    mModel.do_set_Gimbal(msg_cmd.param1, msg_cmd.param2);
    break;

As we know, do_set_Gimbal is implemented in DroneModel, showing that channel 9 is for pitch control. (8 is for yaw)
We are working on Mavic. So just curious about why you said Mavic might have issue, is it fundamentally restricted by DJI SDK ?

Great tips @The1only ! We do find below important lines in MAVLinkReceiver which can map to DroneKit Servo control
case MAV_CMD_DO_SET_SERVO:
    mModel.do_set_Gimbal(msg_cmd.param1, msg_cmd.param2);
    break;

As we know, do_set_Gimbal is implemented in DroneModel, showing that channel 9 is for pitch control. (8 is for yaw)
We are working on Mavic. So just curious about why you said Mavic might have issue, is it fundamentally restricted by DJI SDK ?

Update @The1only : Good news, we are able to make camera looking down (i.e. bird's view) by changing the servo position between 1500 and 1000.
However, we got issue on making the camera looking up. We changed the servo position up to 2000 but there is no response.
We are testing DJI mavic mini, codes are below:

msg = self.vehicle.message_factory.command_long_encode(
0, 0,  # target_system, target_component
mavutil.mavlink.MAV_CMD_DO_SET_SERVO,  # command
0,  # confirmation
9,  # servo number
position,  # servo position between 1000 and 2000
0, 0, 0, 0, 0)  # param 3 ~ 7 not used

-- Luke

Update @The1only : Good news, we are able to make camera looking down (i.e. bird's view) by changing the servo position between 1500 and 1000.
However, we got issue on making the camera looking up. We changed the servo position up to 2000 but there is no response.
We are testing DJI mavic mini, codes are below:

msg = self.vehicle.message_factory.command_long_encode(
0, 0,  # target_system, target_component
mavutil.mavlink.MAV_CMD_DO_SET_SERVO,  # command
0,  # confirmation
9,  # servo number
position,  # servo position between 1000 and 2000
0, 0, 0, 0, 0)  # param 3 ~ 7 not used

-- Luke

Tilt works fine, but you can not do 2000 that would be stright up, try 1600 and increase.
Pan is the real issue, only work on ground, not in air.

Tilt works fine, but you can not do 2000 that would be stright up, try 1600 and increase.
Pan is the real issue, only work on ground, not in air.

Thanks for your reply so that we are able to realize a 5.5 value corresponds to 1 degree. and the tile range is from -90 to +20 degree.

Thanks for your reply so that we are able to realize a 5.5 value corresponds to 1 degree. and the tile range is from -90 to +20 degree.

Hi, I'm the creator of mavlink2rest, I'm a bit lost, is there any integration for it in this project, is there any work in progress for that or is this an acceptable contribution ?

I am the creator of Rosettadrone2.
As we do a mavlink2DJI as part of our project, and you do mavlink2rest, som has then done rest to DJI, using both projects. And the reported it working.
You do great work, let’s work more together.

Just had a successful test flight with my mavic mini controlled by a artificial intelligence python script to avoid obstacles. First results are promising. Congratulations to  "The1only" for this excellent Rossetadrone2 work.

This might sound trivial but could you make a basic tutorial for this ? once you have rosetta drone working and are able to do a QGC mission, where would i start to use this? my goal is to add a python VoiceBot to automatically handle take off, landing, and assignment of missions.

Did you find the way? i wanna do something like that with a Mavic Mini

I would love to have a little guide for that. I’m trying to connect my Mavic Mini

Read the DroneKit for Python manuals, it’s all there.
Best regard
Terje Nilsen
9Tek AS
Norway

On Dec 28, 2021, at 21:35, Newguyonthefield @.***> wrote:

This might sound trivial but could you make a basic tutorial for this ? once you have rosetta drone working and are able to do a QGC mission, where would i start to use this? my goal is to add a python VoiceBot to automatically handle take off, landing, and assignment of missions.
Did you find the way? i wanna do something like that with a Mavic Mini
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.

Just had a successful test flight with my mavic mini controlled by a artificial intelligence python script to avoid obstacles. First results are promising. Congratulations to "The1only" for this excellent Rossetadrone2 work.

Hi @avncalst, I saw your video on YouTube.
Which repo are you using? I saw some reports of problems dealing with the video stream. Have they been fixed?
I'm interested in writing AI scripts for the mini SE.

Thank you Cristopher,It feels god when someone fully understands ones work. It was presisly this I designed Rosettadrone 2 for. I did AI powerline inspections fully autonomous without any human interaction or pre planning.Best regardTerje Nilsen9Tek ASNorwayOn 9 Jan 2023, at 03:00, Christopher Pereira @.***> wrote:
Just had a successful test flight with my mavic mini controlled by a artificial intelligence python script to avoid obstacles. First results are promising. Congratulations to "The1only" for this excellent Rossetadrone2 work.
Hi @avncalst, I saw your video on YouTube.
Which repo are you using? I saw some reports of problems dealing with the video stream. Have they been fixed?
I'm interested in writing AI scripts for the mini SE.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

Hi @kripper  my code can be found on GitHub https://github.com/avncalst/drone_cnn/tree/master/rosetta. I had no problems video streaming using gstreamer.

I compiled with Android Studio "The 1 only's" repo june 2021. So the enhancements for the Mini 2  were not yet available

Do you know if it's possible to control attitude (roll, pitch, yaw)? I tried code from dronekit examples (https://github.com/dronekit/dronekit-python/blob/master/examples/set_attitude_target/set_attitude_target.py), but it does't work, nothing changes

Closing. Discussion continues here: https://github.com/RosettaDrone/rosettadrone/discussions/133

I compiled with Android Studio "The 1 only's" repo june 2021. So the enhancements for the Mini 2 were not yet available

Hi @avncalst, you were probably using a MINI (not MINI SE). Good to know that video streaming works with the MINI.
Could you please test video streaming using latests version of RosettaDrone?


Standalone exit proxy

For #4727
Add a proxy that 'adds' an interface to an exit class zcl_abapgit_standalone_exit that implements the exit methods directly.
Can be implemented with relatively little effort. More importantly, it needs no further action for most abapGit updates, just paste the new version and go.
To implement a standalone exit we must de-interface the regular user exit:

Create class zcl_abapgit_standalone_exit
Copy/paste definition(s) you need from zif_abapgit_exit into the public section
Adapt or create any necessary abapGit-specifics (z-data types, zcx_abapgit_exception)
Implement the method(s)

The proxy will forward any exceptions raised by the methods to zcx_abapgit_exception and parameter types must be compatible.
If the solution is agreeable I'll add it to the docs too.

why wont
* create class ZCL_ABAPGIT_USER_EXIT implementing ZIF_ABAPGIT_EXIT in following include,
* if using the development version of abapGit create a global class instead
* place the object in a different package than ZABAPGIT
INCLUDE zabapgit_user_exit IF FOUND.

work? I'd suggest only having one approach for one thing

I understand the pain of having to adjust the exit class since we added a few new methods to the exit interface in recent months. But generally, that doesn't happen often.
I agree with Lars. We already have two approaches (include with local class/global class). The proxy would make it even more complicated.
What if we had zcl_abapgit_user_exit_super with a default implementation (just RETURN. for all methods)? For the actual implementation in zcl_abapgit_user_exit, you could redefine only the exit methods you want to use.

Hmm, I misunderstood something and didn't realise the INCLUDE approach was already implemented because it continued to be debated in the issue. Nevermind, it was a fun challenge :)
We can drop this approach.

On a more general note, I think the whole exit concept would be cleaner with more of a BADI-like approach where each exit has its own class. It started off with a small number of exits and has now grown to 18 all lumped into one class and will likely grow further.
Perhaps something like a fixed class name per exit that is addressed through dynamic programming, or a separate 'abapGit-exits' repo containing the interfaces. If they exist then any implementing classes are loaded and executed. Of course this raises a migration and compatibility questions too...

It's the curse of standard software. One fits all... except for this switch or that switch and this exit or that exit ;-)

Closed, let's discuss if there's a need to overhaul the exit concept in #4786


How does this project compile

How does this project compile

ubuntu 20.0.4

You require a system running macOS and Xcode


Golint validation insists on CamelCase for (Windows) constants

Windows constants such as errors are universally in ALL_CAPS, for example https://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx. But the golint validation forces CamelCase which is not appropriate for Windows code.
eg https://github.com/docker/docker/blob/master/daemon/execdriver/windows/run.go#L24-L31

If you are reporting a new issue, make sure that we do not have any duplicates already open. You can ensure this by searching the issue list for this repository. If there is a duplicate, please close your issue and add a comment to the existing issue instead.
If you suspect your issue is a bug, please edit your issue description to include the BUG REPORT INFORMATION shown below. If you fail to provide this information within 7 days, we cannot debug your issue and will close it. We will, however, reopen it if you later provide the information.
For more information about reporting issues, see CONTRIBUTING.md.
You don't have to include this information if this is a feature request
(This is an automated, informational response)

BUG REPORT INFORMATION
Use the commands below to provide key information from your environment:
docker version:
docker info:
Provide additional environment details (AWS, VirtualBox, physical, etc.):
List the steps to reproduce the issue:
1.
2.
3.
Describe the results you received:
Describe the results you expected:
Provide additional info you think is important:
----------END REPORT ---------
#ENEEDMOREINFO

@jhowardmsft I'm going to close this prematurely. Feel free to reopen if you still have problems. Thanks!


file for rings/swaps also considering policy

when opening several rings in a short period of time it'd be nice to handle then separately in files instead of editing the script
format per line: key: value
I for now added lines for following keys

members (comma separated list first_peer,…,own_peer … number of peers can be determined e.g. by count of commas+1)
capacity (optional, can be read from listchannel)
url (informational where a channel might be documented, e.g. <lightningnetwork.plus> )
policy_base (policy for base_fee_msat)
policy_min_htlc (policy for min_htlc_msat)
policy_fee_rate (policy for fee_rate)

any thoughts what else would be useful, also to automate the whole ring building and initial balancing as well as keeping additional information?

That was my original thought, but it has been decided to keep it all in one file, as file parsing could just by itself be consisted of more code than the whole current script.

If you can manage to do something reusable, simple and stable, feel free to suggest a pull request.

The aim here is to keep Igniter small and simple.
Nothing prevents from copying the script with different configurations as it is.
Since this issue hasn't got any traction in more than two months, it will be closed.
Thank you @vv01f for the suggestion!


Add auth flow with parallel routes

When it comes to handling and routing authentication, it may be good to build out the base system. I came across this guy who uses parallel- and intercept routing in nextjs to deal with auth flow, and it looks quite nice. See below. What do people think?
You can check out the code here - notice the two @auth and (auth) folders:
https://github.com/joschan21/breadit/tree/master/src/app/(auth)
He made a YT video about that code. I think only intro and the auth stuff are relevant for us right now:
https://youtu.be/mSUKMfmLAt0?si=orDCBmcwJt3LGDNI&t=1800
NextJS docs on intercepting routes
https://nextjs.org/docs/app/building-your-application/routing/intercepting-routes

This feature will be tackled incrementally.
We must implement an auth flow that works with course enrollment, and a variety of other entries points into the flow.
Auth pages
routes: /sign-in, /sign-up

The user will initially be directed to the route sign-in with a button below for passage into the route sign-up. [In the beginning there will be few users so it may make more sense to prioritise sign-up before the sign-in page]
Auth Flow
The simplest case of user authentication is when the user decides to sign-in/up from a top navigation bar, or a vanilla sign-in/up button without any need for redirection into a specific page.
However, it would be handy for the user to be sent back to the page the initiated the auth flow from in order to maintain a pleasant user experience.
<any page in symposia> ->
<sign-in page> ->
<user signs in> ->
<1st page in flow>

In the case of the user authenticating to initiated course enrollment, a redirection to the course enrollment page is necessary. The flow in that case would look something like this:
<course detail page> ->
<user clicks "sign-in/up to enroll"> ->
<sign-in page> ->
<user signs in> ->
<course enrollment page>

As such, we require a redirection mechanism that will be able to handle the course enrollment flow at the minimum, and optimally the most basic kind of redirection set in the first flow diagram above.

Having tried this pattern with parallell and intercept routes at work, I can see now that it doesn't really achieve what I first expected. It's actually better (and easier) to just generate a pop-up window for the login flow.

ref #49


Add support for lists

Would be cool if it also worked in lists! =)

Well, I understand your desire but GitHub itself does not support it so priority is not high (PR is welcome).

For example

[!NOTE]
This is not rendered as Alert even in GitHub (2024/03/30)

[!NOTE]
But this does (2024/03/30)


create-near-app missing dev dependency asbuild

I tried to run yarn dev right after I installed all dependencies and it failed with this error:

But then I realised that I need 1 more dev dependency asbuild, after I added it all worked fine.

Just in case - here are my NodeJS, NPM & Yarn versions:

Just posting this for future readers' reference:
The above issue occurs when installing create-near-app with assembly script as an option.
I got the same asb: command not found error.
I read online that installing near-sdk-as would resolve that (the absence of asbuild commands), so I installed near-sdk-as, but somehow it gets installed in the /contract folder instead of the root. So I had to manually add the dependency info to the package.json in the root and run yarn install again.
Only then the error was fixed.

This should be fixed in the latest version


set.headers is ignored in some situations

What version of Elysia.JS is running?
1.0.14
What platform is your computer?
Linux 5.14.0-362.24.1.el9_3.x86_64 x86_64 x86_64
What steps can reproduce the bug?
import { join } from 'bun:path'
import Elysia from 'elysia'

export function tryFiles (elysiaContext, publicDir, handler) {
  const absolutePath = join(process.cwd(), publicDir, elysiaContext.path)

  const allowedBasePath = join(process.cwd(), publicDir, '/')
  if (!absolutePath.startsWith(allowedBasePath)) {
    return elysiaContext.error(403) // 'Forbidden'
  }

  if (absolutePath === allowedBasePath) {
    return handler(elysiaContext)
  }

  const file = Bun.file(absolutePath)
  if (file.size === 0) {
    return handler(elysiaContext)
  }

  return file
}

export async function respond (elysiaContext) {
  try {
    const body = `<!DOCTYPE html>
    <html lang="en">
      <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <base href="/">
        <title>Response</title>
      </head>
      <body>
        This is an HTML response
      </body>
    </html>`

    elysiaContext.set.headers['Content-Type'] = 'text/html'
    return body
    // return new Response(body, { headers: { 'Content-Type': 'text/html' } }) this always returns text/html as expected
  } catch (err) {
    console.error(err)
  }
}

const app = new Elysia()

if (process.env.BUN_ENV === 'production') {
  app.get('*', (ctx) => respond(ctx))
} else {
  app.get('*', (ctx) => tryFiles(ctx, 'build', respond))
}

app.listen(8080)

When BUN_ENV !== 'production' then body is returned with Content-Type set as text/plain despite it being set as text/html
I do not think it is my fault, but it might be.
What is the expected behavior?
body is returned as text/html
What do you see instead?
body is returned as text/plain
Additional information
No response

Problem is solved by defining app using method chaining on Elysia constructor


Builder Interface for OBT and MBT

Is your feature request related to a problem? Please describe.
Creating a ObjectBlockingTask or MethodBlockingTask and assigning names/priorities/other fields can get cumbersome with multiple dot statements. This problem can either be solved by having a constructor which takes in n arguments, where n is the number of fields as Task specifies. On the other hand, a Builder pattern would allow for a cleaner solution.
Describe the solution you'd like
A Builder pattern as the primary interface for a ObjectBlockingTask and MethodBlockingTask.

will have to update unit tests


[GA analytics widget]: clicking on pagination doesn't trigger pushFunction

If you use the analytics with this configuration, pushFunction is not triggered when a user clicks on a new page. With the triggerOnUIInteraction option to true, we expect that it is.
movies.addWidget(
  instantsearch.widgets.analytics({
    pushFunction: function(formattedParameters, state, results) {
           console.log('pushFunction')
    },
    pushInitialSearch: true,
    triggerOnUIInteraction: true,
    delay: 0,
  })
);

Here is a jsfiddle reproducing the issue: https://jsfiddle.net/mthuret/j9nwpz34/23/

Hi @mthuret, thanks for opening this ;)
What do you mean by 'when a user clicks on a new page"? Is it like when a user clicks on a link?

When clicking on a link of the pagination widget, pushFuction is not triggered whereas if you select something using the refinement list it is.
This was first reported by a user on support.

There seems to be two problems here, in your example the clicks do not trigger the analytics function and when the page is updated is not called either.

Reproduced in v2: https://jsfiddle.net/bobylito/3yoa6285/

Ok so the bug with the pagination not sent with the analytics has been solved in 2.2.0-beta.1 (related PR). Also the triggerOnUIInteraction option is for triggering the analytics before we change page. Internally the widget is conservative and will not call the hook if the state hasn't changed.

Thanks for digging into this @bobylito! Will this fix be ported to v1 or update to v2 is the way to get it?

We have no plan to backport it (it's implemented as a feature) and it's not yet released as part of a stable release. Let me know if it causes too much problem and will find a way to backport it.


Support multiple date selection

This PR plans to add multiple date support, to close #43.

[x] Add dates prop to Calendar, allowing it to receive multiple dates rather than just 1
[x] Add mode="multiple" to DatePicker
[x] Add label to DatePickerModalHeaderContent when selecting multiple dates
[x] Add option to require at least 1 date (i.e. don't remove the last date if it's changed.) Maybe this should just be done by users by not changing the date if length < 1 Instead, we notify users with the day just clicked and whether it was added or removed

@RichardLindhout Can you confirm that we can close this if I can get it done and make it work well?
Thanks!

All set, looks good to go. All added to the example too.
Here's a video: https://www.loom.com/share/ea24599c192041d5abbdedb580e136c0

Thanks for al your work!! <3
I'll get back in a few hours to accept it and make a new release!

No problem! I have one last change to commit and it should be good to go. It's not blocking, but it's an added feature. When you call onChange, in addition to dates, it should also give you the date you just clicked and whether it was added or removed.

Good to go

Really happy with it! You are amazing

Is it ok to add your video to the release for people to see it in action?

I did one slight API change renamed "multi" to "multiple"

Yeah feel free to share the video!
multiple sounds good, too.

 I'm working on trying to fix this!


Two Tables One Wheel Not Saving View Settings

Normally, when I open PinballY it automatically goes to whatever my view was the last time I had it open. So if I was looking at my Favorites list when I shut it down, it opens to my Favorites when I launch it again.
But with Two Tables One Wheel, it's always opening with "Show Alternate Tables" selected. I deselect it, close PBY, reopen, and Show Alt Tables is selected again.
Is that just me or is it happening for anyone else?
I wouldn't mind it defaulting to one state or the other. But if it has to do that, I'd prefer it not show alternate tables by default.

What value does “custom.AlternateVersionFilterMode” have in your Settings.txt file? Does it change when you change the setting in PinballY and then exit?

custom.AlternateVersionFilterMode is set to 1. I opened the file in Notepad++ and opened/closed PBY a few times changing the Show Alt Versions setting each time. Sometimes custom.AlternateVersionFilterMode updates (to either 0 or 1) and sometimes it doesn't.

And sometimes it updates when it shouldn't.

That's not good. Will look into it and see if there's something I've missed.

Am I the only one having this issue?

I'm a bit late to the party, but I've seen this issue as well. Ended up just hard-coding it in the script.

I'm a bit late to the party, but I've seen this issue as well. Ended up just hard-coding it in the script.

Can you share how you did that?

I'm a bit late to the party, but I've seen this issue as well. Ended up just hard-coding it in the script.

Can you share how you did that?

Absolutely! I changed line 19 from
let alternateVersionFilterOn = optionSettings.getBool(alternateVersionFilterKey);
To
let alternateVersionFilterOn = false;
And it defaults to not showing alt tables. You can set it to true to show them by default instead.

I'm a bit late to the party, but I've seen this issue as well. Ended up just hard-coding it in the script.

Can you share how you did that?

Absolutely! I changed line 19 from
let alternateVersionFilterOn = optionSettings.getBool(alternateVersionFilterKey);
To
let alternateVersionFilterOn = false;
And it defaults to not showing alt tables. You can set it to true to show them by default instead.

Took me a while to get back to this. I don't see let alternateVersionFilter On anywhere in the 2 tables one wheel script or in the main.js script. Where did you change that?

I'm a bit late to the party, but I've seen this issue as well. Ended up just hard-coding it in the script.

Can you share how you did that?

Absolutely! I changed line 19 from
let alternateVersionFilterOn = optionSettings.getBool(alternateVersionFilterKey);
To
let alternateVersionFilterOn = false;
And it defaults to not showing alt tables. You can set it to true to show them by default instead.

Where did you make this change? I don't see alternateVersionFilterOn = optionSettings.getBool(alternateVersionFilterKey); anywhere in the two tables one wheel script.

Hm, you sure? I'm seeing it on line 19 here on github.
let alternateVersionFilterOn = optionSettings.getBool(alternateVersionFilterKey);
as a direct quote from https://github.com/PinballY/PinballY-Addons-and-Examples/blob/main/two-tables-one-wheel/two-tables-one-wheel.js.

 DOH! I had the wrong file open. Can't believe I didn't realize that. Thanks!

No problem, happy to help!


Collectives without HostCollectiveId give 500

I can repro it with react-native-firebase collective. It's linked to us for host, they want to host it. Setting HostCollectiveId as null gives a 500 for collective page.

can't repro this now. closing.


I want to do a novel website background with this project

Laravel Version: 5.5
Voyager Version: 1.1
PHP Version:7.2
Database Driver & Version:mariadb 10.2

Description:
I want to use this project to be a novel website backstage. The novel website needs to have books. There are chapters under the books. How does this association relationship be handled? I have watched the video tutorial without mentioning how this novel class should establish BREAD.
Steps To Reproduce:

https://laravel.com/docs/5.6/eloquent-relationships#one-to-many

Yes, I know this, but how can I configure BREAD to complete the process of clicking on a novel book name, entering a chapter directory, and editing a chapter directory without editing code?

Thank you very much for your answer. @SteamWind

If it's a frontend feature you are speaking about, it's up to you to create it with laravel. You can't create frontend views.
The concept of Voyager is to help you create a backend and let you do your frontend by yourself ;)
https://voyager.readme.io/docs/what-is-voyager

Thank you very much for your answer, but may need a tool to automatically generate the front-end, the back-end code is well written, I am very headache front-end page display

You need a CMS in this case...

:) There are too many concepts in laravel. Not suitable for developers who are new to learning php.

You need some PHP basis to learn Laravel yeah, and you need some Laravel basis to use Voyager.

Yes, thank you very much for your suggestion.

Okay, you can now close issue I think 😄

Is there some good laravel introductory tutorial?

https://laracasts.com/skills/laravel

Thanks again


raise error when error value from lib is non-zero

closes #36

Well the open returns a bool, why would it raise an exception? This seems to be a breaking change.

I don't disagree. That's why I asked in #36. What do you suggest?

Return false for an error?

that's the current behavior, but there's no to get the cause of the failure.

Hmm, I dunno. Introduce another constructor then that returns an Error type, maybe. Not everybody cares why open failed, if it failed, that's often all you need to know.


Add "not" toggle switch for rule groups

Fixes #99.

Codecov Report

Merging #104 into master will not change coverage.
The diff coverage is 100%.

@@          Coverage Diff          @@
##           master   #104   +/-   ##
=====================================
  Coverage     100%   100%
=====================================
  Files          12     13    +1
  Lines         222    230    +8
  Branches       20     21    +1
=====================================
+ Hits          222    230    +8

Impacted Files
Coverage Δ

src/utils/generateValidQuery.js
100% <ø> (ø)
:arrow_up:

src/QueryBuilder.jsx
100% <ø> (ø)
:arrow_up:

src/utils/formatQuery.js
100% <100%> (ø)
:arrow_up:

src/controls/NotToggle.jsx
100% <100%> (ø)

src/RuleGroup.jsx
100% <100%> (ø)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 85381c5...bfb33a6. Read the comment docs.


New Off-canvas docs (WIP)

This is the updated off-canvas docs for the new version from @brettsmason
Looking for some feedback to "finalize" it.

@brettsmason Where should me mention the .is-open class that's added to the .off-canvas.?

@brettsmason See any classes or options missing?

@brettsmason Thanks for the feedback! I'll update the PR then ask you to merge it!

@rafibomb I've been through and added some corrections, and reworked a few examples etc.
Could you take a look and see if its OK?

Sweet! This is amazing - You are a legend!


[Feature]: Add Sorting Feature for "My Journal" by Month and Year

What is the proposed feature?
Add a sorting functionality in the "My Journal" section of the movie-based app that allows users to sort entries according to month and year. This feature will improve the user experience by enabling users to easily organize and view journal entries based on the time they were created or edited.
Expected Outcome

Users should be able to select a sorting option that filters the journal entries by month and year.
The sorting method should dynamically update the displayed entries to reflect the selected time period.

Please assign this issue to me under gssoc-ext level3 and hactoberfest-accepted, @sid0000007 , as I am interested in working on it.

hey @PrityanshuSingh go ahead just make sure to attach an screen recording of your solution and do no commit any package.json files if you are using npm.

Ok will keep that in mind

@PrityanshuSingh whats your status. Any help required?

@PrityanshuSingh whats your status. Any help required?

Hello @sid0000007, I have just submitted a PR for the issue. I also wanted to take a moment to express my appreciation for your code structure and flow; it is well-maintained and clean.


questions about the pour real robot data and the application to franka arm

Hi, really excellent work! We have franka panda arm, and try to replay the pour task using the data given pour_40demo_1024.zarr.  There are the problems:
1、The RGB values of the point_cloud in some frames are negative, which causes an error when using visualize_pointcloud to visualize the point cloud.
import zarr
import numpy as np
from pointcloud import visualize_pointcloud

zarr_data = zarr.open('data/pour_40demo_1024.zarr', mode='r')

point_cloud_data = zarr_data['data/point_cloud'][1]

print(f"Point cloud data type: {type(point_cloud_data)}")
print(f"Point cloud data shape: {point_cloud_data.shape}")
print(f"Point cloud data: {point_cloud_data}")

point_cloud_data = np.array(point_cloud_data)
visualize_pointcloud(point_cloud_data)

2、The last dimension of the action seems unusual, alternating between -0.08500000089406967 and 0.08500000089406967, except for when it is 0.0. What does this value represent? From my understanding, action[0:3] corresponds to changes in the end-effector's position, while action[3:6] represents changes in the end-effector's Euler angles, am I right?
I use the following code to show the values of actions:
import zarr
import numpy as np
from pointcloud import visualize_pointcloud
zarr_data = zarr.open('data/pour_40demo_1024.zarr', mode='r')
action=zarr_data['data/action']
print(action.chunks)
print(f"action data type: {type(action)}")
print(f"action data shape: {action.shape}")
for i in action:
    print(f"action: {i[-1]}")

result：

after filtering out 0.0:

Besides, can I get some advice on robot controller? Should I use panda_py、 franka_ros or other implementations to conctrol franka arm?

I apologize for asking again, but could you please provide the data collection frequency, specifically how many frames per second? I'm concerned that I may not have set it correctly.

Hi, thanks for your questions!

For visualization, I recommend using the provided visualization tool to visualize 'xyz', as our policy is trained with 'xyz' as input. There might be some incorrect RGB values in certain frames due to device issues. We will fix that.
The last dimension of the action represents the delta change in the gripper width. We use binary control for the gripper, so the value alternates between two fixed states.
You can use any common Franka controller; the ones you listed are acceptable. In our setup, we use Frankx as the Franka controller.
The demonstrations for the Franka arm were collected using a keyboard. As a result, we did not specify a collection frequency. You can choose an appropriate frequency to replay the data.


SyntaxError: Cannot use import statement outside a module

Wanted to open by thanking @maantje for this package. Really amazing and I love it.
However, recently I had some issues when it came to sending emails in an AWS EC2 Linux server. I would get this error:
SyntaxError: Cannot use import statement outside a module
    at internalCompileFunction (node:internal/vm:76:18)
    at wrapSafe (node:internal/modules/cjs/loader:1283:20)
    at Module._compile (node:internal/modules/cjs/loader:1328:27)
    at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
    at Module.load (node:internal/modules/cjs/loader:1203:32)
    at Module._load (node:internal/modules/cjs/loader:1019:12)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:203:29)
    at ModuleJob.run (node:internal/modules/esm/module_job:195:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:337:24)
    at async loadESM (node:internal/process/esm_loader:34:7)

Upon a lot of proding here are my findings:

Issue does not occur in my local MACOSX machine.
Error is thrown at /node_modules/.bin/tsx which is a separate package
If I SSH into the server, navigate to/node_modules/.bin, within the terminal, I can run the command that this package runs in Renderer.php to render the email with a few small tweaks: *absolute path to node* --import tsx *absolute path to render.tsx* *absolute path to email template* *data for email* (added --import)

With above, if I don't use --import, I get the same error
If I try to run the same (with --import) from the root project directory, it doesnt work

Since it seems that the issue lies with ES6 modules, I looked into the /node_modules/tsx folder itself (not the .bin export) and found that /dist/cli.mjs was able to run.
I was able to make the entire thing work from the root project directory by replacing the command like so *absolute path to node* *absolute path to /node_modules/tsx/dist/cli.mjs* *absolute path to render.tsx* *absolute path to email template* *data for email*
It seems that even with much effort, node does not try to run /node_modules/.bin/tsx as an ES6 module

"type":"module" in the package.json of my root application seems to be ignored by node
Flags like --experimental-modules and what not (i forgot what I tried to run) do not work
I honestly forgot what else I tried to run but it was a lot.

Fix:
I ended up writing my own Renderer.php by replacing the constructor as follows:
private function __construct(string $view, array $data = [])
{
  parent::__construct([
    $this->resolveNodeExecutable(),
    base_path('/node_modules/tsx/dist/cli.mjs'), // this is the change, referring to cli.mjs instead of tsx
    base_path('/vendor/maantje/react-email/render.tsx'),
    config('react-email.template_directory') . $view,
    json_encode($data)
  ], base_path());
}

I hope this can help others that may have encountered this issue. Currently, I am not sure if this is a persistent issue with Linux or what the root cause truly is and so I'm reluctant to create a PR that may not be useful to everyone.
I would love to hear your thoughts and discuss what the best next steps should be.
Some Context:

Server Env details:

PHP 8.2
Node 18.20

Others:

package.json of project has "type":"module"

Also, if there's something that I am understanding incorrectly, please let me know too :D


Making echo a bit more reliable with newlines.

Echo is inconsistent across different versions of bash. In some versions, the newline character is printed. -e helps correctly interpret them.

Thanks @rrmehta2!

I have updated to the latest version of the completions. But i get an error when i run this command source sfdx.bash:
-bash: -e: command not found

I am using Mac OS 10.14.5
I figure it probably has to do with this PR.

The bug is the errant -e that got checked in on line 1 in this commit - https://github.com/wadewegner/salesforce-cli-bash-completion/commit/b425763a143b0131dbe957b180fca57345ee4068
cc @wadewegner

With that being said, i made a new issue for this topic: #5

Can someone send a PR with the fix? Thank you!
On Tue, Jul 9, 2019 at 8:35 AM Theodoor van Donge<EMAIL_ADDRESS>wrote:

With that being said, i made a new issue for this topic: #5
https://github.com/wadewegner/salesforce-cli-bash-completion/issues/5
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/wadewegner/salesforce-cli-bash-completion/pull/1?email_source=notifications&email_token=AAFWGE77ES7V7PL4FLQRCPLP6SHYRA5CNFSM4FTRQGGKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZQI67I#issuecomment-509644669,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAFWGE7BQNWMWBJJNJFSZ5LP6SHYRANCNFSM4FTRQGGA
.


Is anyway or plan to add script to md ？

content.md
<link-to-repository color="#37ae70">See Repository</link-to-repository>

change to
<link-to-repository :color="color">See Repository</link-to-repository>

<script>
export default {
  data() {
    return {
      color: "#37ae70",
    };
  },
};
</script>

and add style tag , just like vuepress

Since this plugin is focused on importing plain markdown/frontmatter-ed markdown on vite basically, it's not supported currently, nor planned for the future.
VitePress might cover your use-case I guess https://github.com/vuejs/vitepress

@xxholly32
like this repo ? https://github.com/JasKang/vite-plugin-vuedoc

@JasKang yes it`s exactly what i want. job well done

Great project! I'm happy to hear you found what you needed.


Why first predict x_start then predict x_{t-1}?

Why not directly predict x_{t-1} from x_t and noise?

I got it. x_start is used in self conditioning, which referred at https://github.com/lucidrains/denoising-diffusion-pytorch/issues/94


[Chore] Improve owasp dependency check

What changes were proposed in this pull request
Issue Number: close #xxx

Brief change log

Using NVD API KEY to speed up owasp dependency check
Bump up owasp dependency check version

Verifying this change

This change is a trivial rework / code cleanup without any test coverage.
(or)
This change is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:

Does this pull request potentially affect one of the following parts

Dependencies (does it add or upgrade a dependency): (yes / no)

@wolfboys PTAL


[TwigComponent] Fix usage of {% embed %} with {% block %} in twig: components, close #952

Q
A

Bug fix?
yes

New feature?
no

Issues
Fix #952

License
MIT

Hi everyone, this PR is an attempt to fix #952.
It fix supports for {% block X %}foo{% endblock %} and {% block X "foo"%}, from {% embed %}, in <twig:> syntax.
The following code:
<twig:Alert>

        {% embed "my_embed.html.twig" %}
            {% block my_embed_block_1 "foo" %}
            {% block my_embed_block_2 %}bar{% endblock %}
        {% endembed %}

</twig:Alert>

is now properly converted to:
{% component 'Alert' %}
    {% block content %}

        {% embed "my_embed.html.twig" %}
            {% block my_embed_block_1 "foo" %}
            {% block my_embed_block_2 %}bar{% endblock %}
        {% endembed %}

{% endblock %}{% endcomponent %}

Since I'm not familiar with the PreLexer, let me know if a better solution/implementation exists.

I'm personnaly  👎
Main reasons:

I'm really not in favor of mixing syntaxes...
I don't want twig:blocks to be used outside components
TwigComponent should not be a trojan horse to change all the Twig syntax

When we'll rewrite the HTML prelexer, or the component rendering/ code generation...  we don't want to deal with all Twig. As we already have not all the time to solve or improve TwigComponent / LiveComponent things.
I won't fight this in anyway of course, but really i'd rather go the other way around and forbid <twig:block /> outside TwigComponent "today"...

So what's your alternative for smoothly migrating big code-base that uses {% embed %} with {% block %} inside, without adding a lot of works?
To me, blocks inside <twig:>' component should accept any valid Twig syntax.

To me, blocks inside twig:' component should accept any valid Twig syntax.

On this, i 100% agree.  Even if "philosophically" i'm having doubt about this embed-in-template situation.
I really agree (or we should announce this "non-compatibility").
But this may/should not be done by writing more code about specific template tags (again, not criticising your work on this, far from it..) but i lost so many hours trying to debug things in Twig/Live components, that i'm 100% certain if we start to code specific things about every tag construct of twig, there is a big maintanability problem...
So i really do not thing we should have any code concerning "embed"  in this repository. Or we should also have to handle "macro", "with"..... and "use".
That beeing said, what are the alternatives right now ? I don't know :(  Can this by fixing exisiting block handling ?

But this may/should not be done by writing more code about specific template tags (again, not criticising your work on this, far from it..) but i lost so many hours trying to debug things in Twig/Live components, that i'm 100% certain if we start to code specific things about every tag construct of twig, there is a big maintanability problem...
So i really do not thing we should have any code concerning "embed" in this repository. Or we should also have to handle "macro", "with"..... and "use".

Yeah I understand your point too, maybe my approach is to naive and can be optimized for others Twig tokens like macro, with...

That beeing said, what are the alternatives right now ? I don't know :( Can this by fixing exisiting block handling ?

TBH I don't know, all I can say during my debug phase is that the following code (without blocks in embed):
<twig:Alert>

        {% embed "my_embed.html.twig" with { foo: 'bar' } %}{% endembed %}

</twig:Alert>

is nicely converted to
{% component 'Alert' %}
    {% block content %}

        {% embed "my_embed.html.twig" with { foo: 'bar' } %}{% endembed %}

{% endblock %}{% endcomponent %}

But this code:
<twig:Alert>

        {% embed "my_embed.html.twig" %}
            {% block my_embed_block_1 "foo" %}
            {% block my_embed_block_2 %}bar{% endblock %}
        {% endembed %}

</twig:Alert>

raises error Expected closing tag "</twig:Alert>" not found at line 8, and generates the following output (before raising the error):
{% component 'Alert' %}
    {% block content %}

        {% embed "my_embed.html.twig" %}
            {% endblock %}{% block my_embed_block_1 "foo" %}
            {% block my_embed_block_2 %}bar{% endblock %}
        {% endembed %}

</twig:Alert>

You can see a {% endblock %} between {% embed "my_embed.html.twig" %} and {% block my_embed_block_1 "foo" %}.

Yo @Kocal!
We should definitely fix this. But, to be clear, I think there are 2 separate issues. I think you fixed them both at once, but I want to clarity.
Issue 1: blocks without endblock:
<twig:Terminal bottomPadding="145">
    composer require symfony/asset-mapper symfony/stimulus-bundle
    {% block my_embed_block_1 "foo" %}
</twig:Terminal>

This errors - we're simply not processing the {% block anything "content" %} properly.
Issue 2: the embed issue where we think blocks that are inside of the embed are blocks for the component.

I think fixing the block thing in the Prelexer would fix both, no ? https://github.com/symfony/ux/blob/a2418ef146f09a858bd12ed0116c3f8058d0a3a8/src/TwigComponent/src/Twig/TwigPreLexer.php#L86
In all manner (and not related to this PR) we have to refacto/improve the PreLexer soon, as we do not handle a lot of minor / edge cases

@Kocal  .. do you think you could extract this part in your code and try without any "embed" handling at first ? Or you do think both need to be fixed at once ?

Hi everyone 👋, thanks for your suggestions, I'll try them ASAP!
Cheers from the mountains 😛

I've applied your suggestions :)

I looked a bit and it's almost perfect. But i think @weaverryan was right, and we are solving two problems at once that deserve independant solutions.
Here is a new test that fails (and probably not because of your code, it was just not tested before i guess)
yield 'component_where_entire_default_block_is_twig_embed_with_endblock_name' => [
            <<<EOF
            <twig:Alert>

                    {% embed "my_embed.html.twig" %}
                        {% block my_embed_block %}{% endblock my_embed_block %}
                    {% endembed %}

            </twig:Alert>
            EOF,
            <<<EOF
            {% component 'Alert' %}
                {% block content %}

                    {% embed "my_embed.html.twig" %}
                        {% block my_embed_block %}{% endblock my_embed_block %}
                    {% endembed %}

            {% endblock %}{% endcomponent %}
            EOF,
        ];

Trying to solve it, and thinking about what i suggested about the embed isolation, i realized.... we should never be in that situation in the first place :)
A current component cannot have any impact on children embed content... So i think when we detect  an embed we should call the prelexer (as it's done in the block parsing)
But it was already there, so let's merge your fix and adress all this after :)

Thanks for your work on this Hugo!

You're welcome :)


Install Python2 on Ubuntu 20.04 CI to ensure that CMake works fine

See https://github.com/ami-iit/bipedal-locomotion-framework/issues/451 .

Close as the debug for https://github.com/ami-iit/bipedal-locomotion-framework/issues/451 was completed.


codecov

Codecov Report

:exclamation: No coverage uploaded for pull request base (main@4b8f027). Click here to learn what that means.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #83   +/-   ##
=======================================
  Coverage        ?   30.25%
=======================================
  Files           ?       51
  Lines           ?      542
  Branches        ?      123
=======================================
  Hits            ?      164
  Misses          ?      359
  Partials        ?       19

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4b8f027...a5315bc. Read the comment docs.


Demos do not work properly with 2017 Calliope mini

We tried to re-activate the demo application on our 2017 Calliope mini and encountered some problems:

the version v1.1 https://github.com/calliope-mini/calliope-demo/releases/download/v1.1/Calliope-Firmware-v1.1.hex starts and we can process the intro session with pressing A but when have to press B in the intro session nothing happens.
the version v2.0 https://github.com/calliope-mini/calliope-demo/releases/download/v2.0/firmware.hex does not work at all, nothing happens
the english version v2.0 https://github.com/calliope-mini/calliope-demo/releases/download/v2.0-en/calliope-demo-2.0-en.hex works properly

Sorry, there was a misttake and I attached the wrong hex file. The correct hex file has been attached to the release now: https://github.com/calliope-mini/calliope-demo/releases/tag/v2.0


Project Console - Unable to add the CLA Group with the same name which got removed during un-enrollment of last project from the CLA Group

Pre-condition: Have a CLA group with one project in it.
Ex: CLA Group Name: asha-foundation-clagrp5
Steps:

Login to Admin Console and click on the project.
Open the newly designed CLA Overview page using this URL: https://admin.dev.platform.linuxfoundation.org/apps/cla/overview#id=
From the left panel click CLA group having only one project. Un-enroll the project and click on Update button. I have unenrolled 'project4' from CLA group 'asha-foundation-clagrp5'
Go back to the CLA Overview screen, it doesn't show the CLA group 'asha-foundation-clagrp5'
Click on Add CLA Group button and try to add the same cla group name

Actual Result - It throws error 'CLA Group with name asha-foundation-clagrp4 already exist'
Expected Result: David Deal Pranab Bajpai I am not sure what should be expected behavior here ?
Either it should delete the CLA group so that same name can be reused OR if CLA Group is not deleted then it should display in the CLA Overview page.

Reference ticket https://jira.linuxfoundation.org/browse/LFX-2790

Marking it as QA Done since Asha verified this one through LFX-2790.

Marking it as QA Done since Asha verified this one through LFX-2790.


issue with plain query using adapter

Below is my setup that i tried to make the plain query work

const options = {
connectionQueryMode: 'plain',
// defaultOptions: {
//   watchQuery: {
//     fetchPolicy: 'cache-and-network'
//   ### }
// },
adapter: CustomAdapter,
database: database,
url: 'http://localhost:8503/',
includeExtensions: true,
debug: process.env.NODE_ENV !== 'production'
}

I want to generate the below query with " await Vuetest.fetch()" But when i call this i get query with 'NODE' mode instead of 'PLAIN' mode

query Vuetests {
vuetests {
id
personTwo
personOne
amount
}
}

Can anyone tell me what's wrong here? Is it the setup or is it something in the graphql-plugin
Without custom/Default adapter i get below node query

and with adapter i get the following error

Can you show me the code of your custom adapter?

##112 this solved my issue.. thanks a lot for quick reply. Glad to use this library


[question] are the Persona > Photos pulling from the 'Authorized' section of UIFaces.com?

I'm wondering if the male / female / neutral persona photos using the 'general' or 'authroized' photos from UIFaces.com. Could you add this info to the repo information?

@louiesolomon I think it is was taken from Authorized section, but not 100% sure. Have to investigate that.


STM32 RTC based os tick

STMF1 already had support for tickles sleep.
Now other MCU with quite distinct RTC also can be configured to LSE/RTC as system tick source.
RTC is added to F0/F4/L0/L1/L4/WB55 which share similar hardware design.
Small changes are present for L0/L1/F0 MCUs.
Some families have low power clocks other then RTC that could be used as tick source but some don't hence common code.
RTC in ST MCUs can be powered by battery and then time can be kept even when MCU is shut down.
Wall clock changes made in current API are stored as UTC time in RTC and are restored at boot time if RTC is powered by battery.
This is first step to use low power STOP mode when tick can wake up system while high speed clocks are stopped.

@kasjer Looks good to me but needs a rebase.

@kasjer Looks good to me but needs a rebase.

@vrahane I rebased with necessary corrections, thanks for checking out.


snowflake_task does not re-set the QUERY_TAG value of the session_parameters.

Provider Version
0.25.34
Terraform Version
v1.0.3
Describe the bug
In using the resource snowflake_task setting the session_parameters of QUERY_TAG does not apply if the value already exists. (Note, the value will be set if it was previously null; but will not change if QUERY_TAG already exists, unless it's being removed.)
Expected behavior
The QUERY_TAG of an existing session_parameters map in a snowflake_task is changed from an existing value to the updated value provided in the TF script.
Code samples and commands
resource "snowflake_task" "copy_from_pitr_s3" {
  for_each = {
    BRAND = {
      destination           = snowflake_table.incoming["BRAND"],
      enabled               = false,
      dynamodb_source_table = local.dynamodb_source_table,
      stage                 = snowflake_stage.s3_pitr_stage,
    },
    LOYALTY = {
      destination           = snowflake_table.incoming["LOYALTY"],
      enabled               = true,
      dynamodb_source_table = "LOYALTY",
      stage                 = snowflake_stage.s3_pitr_loyalty_stage,
    },
  }

  database  = snowflake_schema.ingestion.database
  schema    = snowflake_schema.ingestion.name
  warehouse = "INGESTION"
  name      = "COPY_FROM_PITR_S3_${each.key}"

  schedule = local.ingestion_schedule

  sql_statement = <<-SQL
    // some SQL statement here
  SQL

  enabled = each.value.enabled

  # This is needed in order to eliminate spurious diffs in Terraform.
  session_parameters = {
    "ODBC_QUERY_RESULT_FORMAT" = "ARROW",
    "QUERY_TAG"                = "TASK:COPY_FROM_PITR_S3_${each.key}",
  }
}

Additional context
The following workflows work as expected:
existing QUERY_TAG value is 'x' -> removing QUERY_TAG parameter -> the QUERY_TAG of the appropriate task is null.
existing QUERY_TAG value is null -> setting QUERY_TAG parameter to 'x' -> the QUERY_TAG of the appropriate task is 'x'.
The following workflow does not work as expected:
existing QUERY_TAG value is 'x' -> changing QUERY_TAG parameter to 'y' -> the QUERY_TAG of the appropriate task does not change (stays 'x').

We are closing this issue as part of a cleanup described in announcement. If you believe that the issue is still valid in v0.89.0, please open a new ticket.


Create RomeaandJulietFam.sh

Thanks. The name should be RomeoandJulietFamlies.sh which should generate a conflict with the file that has the same name in the repository if you try to merge.  Similarly, trying to merge all other pull requests should result in conflicts.

Hi Benson,
I changed the name to "RomeoandJulietFamlies.sh". I do see "Resolve conflicts" in GitHub and now it says to use the web editor or the command line to resolve.

Try the web editor first. Once happy with updated version, commit the
changes.

@hkang1091 A similar example on the command line https://github.com/DemoASU2023Feb/git-conflict


Input Data Normalization

Hi,
First of all, thanks for open sourcing such a great piece of work. I have a question about the normalization of 2D inputs (both GT and SH):

Both 2D GT and SH detections are in image coordinates (1000x1000) and you perform normalization directly on these values. IMO, this means that the model learns to take location of the subject into account during training. I wonder if you ever tried to use relative joint locations around a root joint as input. (A normalization similar to centering 3D points around the root) Could it be useful to do such normalization?

Hi @mkocabas!

IMO, this means that the model learns to take location of the subject into account during training.

I agree.

I wonder if you ever tried to use relative joint locations around a root joint as input. (A normalization similar to centering 3D points around the root)

I did try and I remember the network did worse in the experiments without Procrustes alignment in post processing; it was about the same with Procrustes alignment. It should be easy to try it with our code.

Could it be useful to do such normalization?

It probably helps to estimate the person's scale, since there is a perspective projection happening and the network has not other visual information. Estimating 3d models up to scale is common in SfM pipelines and other 3d reconstruction tasks. I don't think it will make 3d pose estimation better per se.

Thanks for the valuable answer @una-dinosauria!

I did try and I remember the network did worse in the experiments without Procrustes alignment in post processing; it was about the same with Procrustes alignment. It should be easy to try it with our code.

I got it, but I feel that centering may help to produce plausible predictions for in the wild images with person in the center. So, I'll give it a try!

It probably helps to estimate the person's scale, since there is a perspective projection happening and the network has not other visual information.

I couldn't understand here. I expect centering to make worse scale predictions, since the input is in relative coordinates. But, do we need to estimate person's scale at all? How can predicting relative joint locations in 3D make use of scale information?

But, do we need to estimate person's scale at all?

In Protocol #1 of H3.6M the error is computed in such a way that we do. In other applications maybe you do not.

How can predicting relative joint locations in 3D make use of scale information?

Perspective. There is a ground plane and we are looking down to it. High ==> further in the back. Low ==> closer to the camera.

I understand it, thank you so much!

Closing for lack of activity. Please reopen if the issue is still ongoing.

Hi @mkocabas, great to see you here. I was working on VIBE, and I wanted to understand if the Humans3.6m 3D poses and the output of the ones from VIBE are in the same coordinate system. As in if the X, Y, and Z axes are the same or interchanged in some other order?


Plain mode: support port forwarding (opt-in)

limactl create --plain is useful to disable Lima's opinionated extensions, but it still makes sense to allow port forwarding as an opt-in feature.
In the case of plain mode, the port list should be obtained from the explicit list in YAML/CLI, not from the guest agent (which shouldn't be running at all in the case of plain mode).
Workaround
The current workaround is to run ssh -L manually:
ssh -q -f -N -L 6443:<IP_ADDRESS>:6443 -F ~/.lima/host0/ssh.config lima-host0

On the same note, it would be great if the environment variables (/mnt/lima-cidata/etc_environment)were also fed to the scripts that are run with provision.mode: user. Currently, in plain mode, looks like the user script don't see these variables and we are forced to run everything with provision.mode: system


Add ability to add nonCirculatingSupplyAddressConfig

A simplified UI to enable user's to add nonCirculatingSupplyConfig will make it easier to provide TokenSupply as a service to projects

New Features

Admin Dashboard: We've introduced a new admin dashboard that provides users with a user-friendly interface to manage their token supply. This dashboard allows users to easily set up and update Non-Circulating Supply Address Config, making the process more intuitive and accessible.

Backend Functions, Routes, and APIs: We have implemented new backend functions, routes, and APIs to support the admin dashboard and other front-end features. These additions enable seamless interaction between the frontend and backend, providing a cohesive user experience.

New API: GET /nonCirculatingSupplyAddresses - Retrieve the list of non-circulating supply addresses.
New API: POST /addNonCirculatingSupplyAddress - Add a new non-circulating supply address.
New API: PUT /updateNonCirculatingSupplyAddress - Update an existing non-circulating supply address.
New API: DELETE /removeNonCirculatingSupplyAddress - Remove a non-circulating supply address from the list.

Improvements

Setup and Update Non-Circulating Supply Address Config: Enhanced the process of setting up and updating Non-Circulating Supply Address Config, ensuring smoother and more reliable functionality. Users can now manage their token supply with ease, directly from the new admin dashboard.

Error Handling: Improved error handling and messaging to provide more informative feedback for users when encountering issues while using the application. This enhancement allows users to quickly identify and resolve problems they might face during setup or updates.

Code Optimization: Refactored the codebase to improve maintainability, readability, and future scalability. This optimization ensures a more robust and efficient application.

Bug Fixes

Fixed XML Error: Resolved an issue where users encountered an XML error when accessing certain routes, such as /updateNonCirculatingSupplyAddressConfig and /setupTokenSupply. Users should no longer experience this issue, allowing for seamless navigation and usage of the application.


Unable to run when installed using "dotnet tool install"

Initially reported here: https://github.com/xamarin/xamarin-macios/issues/10249#issuecomment-1218329626

The acquisition/update of the tool, via dotnet tool, is out of my control - it's a dotnet feature.
I suspect something is wrong in your PATH so the symlinks created by dotnet tools are not accessible.
The symlinks are created under ~/.dotnet/tools, that's what I have locally
l ~/.dotnet/tools                                                                                total 2040
drwxr-xr-x   10 poupou  staff   320B 22 Aug 17:04 .
drwxr-xr-x  107 poupou  staff   3.3K 17 Aug 13:11 ..
drwxr-xr-x   10 poupou  staff   320B 22 Aug 17:04 .store
-rwxr-xr-x    1 poupou  staff   144K 22 Aug 17:04 appcompare
-rwxr-xr-x    1 poupou  staff   144K 13 Feb  2022 cilout
-rwxr-xr-x    1 poupou  staff   144K 20 Apr 20:09 dotnet-cake
-rwxr-xr-x    1 poupou  staff   144K  7 Feb  2022 dotnet-releaser
-rwxr-xr-x    1 poupou  staff   129K  1 Mar 20:58 dotnet-trace
-rwxr-xr-x    1 poupou  staff   144K 22 Dec  2021 ilspycmd
-rwxr-xr-x    1 poupou  staff   144K  8 Aug 11:39 uno-check

and ~/.dotnet/tools is part of my PATH, which you can see with exports, e.g.
$ export | grep ~/.dotnet/tools                                                                                PATH='/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Apple/usr/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Users/poupou/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands'

Actually it seems I have it twice as ~/.dotnet/tools and /Users/poupou/.dotnet/tools - not quite sure why, it's part of dotnet installation.

$ export | grep ~/.dotnet/tools

There no cmd output when I call this
And that's what I see in the ~/.dotnet/tools folder

echo $PATH puts out this:
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Apple/usr/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands

My bad. There's no output because ~ gets expanded by the shell to /Users/timopartl and this one is not in your PATH. It worked for me because both entries are present.
Can you run dotnet-cake ?
$ dotnet-cake
Error: Bootstrapping failed for '/Users/poupou/git/external/uno/uno/build.cake'.
build.cake, line #0: Could not find script '/Users/poupou/git/external/uno/uno/build.cake'.

this also give an error :(
zsh: command not found: dotnet-cake
Maybe there's simply some dotnet issue on my machine, completely unrelated to your tool...

yeah, I don't see how it could be related to appcompare.
OTOH adding /Users/timopartl/.dotnet/tools to your PATH would probably solve the issue :)

It indeed does! Thanks for your help, despite this not being a problem of your tool at all.
Looking forward to using it

Btw, newer .NET SDKs seem to give a warning on the tool installation when the PATH doesn't include the tool directory. It shows instructions on how to correct that:
filipnavara@172-4-1-20 emclient-temp % dotnet tool install -g appcompare
Tools directory '/Users/filipnavara/.dotnet/tools' is not currently on the PATH environment variable.
If you are using zsh, you can add it to your profile by running the following command:

cat << \EOF >> ~/.zprofile
# Add .NET Core SDK tools
export PATH="$PATH:/Users/filipnavara/.dotnet/tools"
EOF

And run `zsh -l` to make it available for current session.

You can only add it to the current session by running the following command:

export PATH="$PATH:/Users/filipnavara/.dotnet/tools"

You can invoke the tool using the following command: appcompare
Tool 'appcompare' (version '2.3.0') was successfully installed.


How to set length for string column?

I know there is no docs, that's why i am asking.
How would you set the limit for string type column, and how would you set the type, 'string' or 'character'?
Thanks, Ivan.

Wherever possible, and especially for types, I try to pass through whatever you type to postgres.
So if you want a column to be a 32 long character field just use the type character(32)
The following convenience types do exist though and will be adapted accordingly.
  'int': 'integer',
  'string': 'text',
  'float': 'real',
  'double': 'double precision',
  'datetime': 'timestamp',
  'bool': 'boolean'


Database Configuration for Docker unclear

On initial setup of the project, I received the following error:
django.core.exceptions.ImproperlyConfigured: settings.DATABASES is improperly configured. Please supply the NAME value.

I though this was due to the DATABASE_URL environment variable not being set somewhere in the local development config. So...
...I set the following variable inside .envs/.local/.django to match up with what was in .postgres:
DATABASE_URL=postgres://superstrongusername:superstrongpassword@<IP_ADDRESS>:5432/asencis

Inside .env/.local/.postgres:
POSTGRES_HOST=postgres
POSTGRES_PORT=5432
POSTGRES_DB=asencis
POSTGRES_USER=superstrongusername
POSTGRES_PASSWORD=superstrongpassword
I then build and up the docker-compose container.
However, the django container responds with the following error:
django.core.exceptions.ImproperlyConfigured: settings.DATABASES is improperly configured. Please supply the NAME value.

I read in the https://cookiecutter-django.readthedocs.io/en/latest/settings.html that this variable is auto imported: auto w/ Docker;. Yet, I don't think it is?
What should've happened instead?
Django container spins up and runs correctly. No configuration errors from the database.
Additional details
Let me know if anything else is needed...

Host system configuration:

Version of cookiecutter CLI (get it with cookiecutter --version): Cookiecutter 1.7.2 from /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (Python 3.8)
OS:
Python version: Python 3.8.7
Docker versions (if using Docker): Docker version 20.10.2, build 2291f61
Docker Compose versions: docker-compose version 1.27.4, build 40524192
Django versions: django==3.0.12

This was due to a password which was extremely long (and containing certain characters not authorised for postgres).

very serious mess with the DB settings. I fixed it like so.

POSTGRES_USER = env_vars["POSTGRES_USER"]
POSTGRES_PASSWORD = env_vars["POSTGRES_PASSWORD"]
POSTGRES_HOST = env_vars["POSTGRES_HOST"]
POSTGRES_PORT = env_vars["POSTGRES_PORT"]
POSTGRES_DB = env_vars["POSTGRES_DB"]
DATABASE_ENGINE=env_vars["DATABASE_ENGINE"]
# DATABASE_URL=f"postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}"
DATABASES = {"default": {
    'NAME': POSTGRES_DB,
    'USER': POSTGRES_USER,
    'PASSWORD': POSTGRES_PASSWORD,
    'HOST': POSTGRES_HOST,
    'PORT': POSTGRES_PORT,
    'ENGINE': DATABASE_ENGINE}
}

This will affect also docs, so you have to load also the postgres .env into the docs.
  docs:
    image: piveau_frontend_local_docs
    container_name: piveau_frontend_local_docs
    build:
      context: .
      dockerfile: ./compose/local/docs/Dockerfile
    env_file:
      - ./.envs/.local/.django
      - ./.envs/.local/.postgres


Add Channel dropdown missing from AOV passes

using Renderman 25.0 Release.
Windows 10

Update: Restarted Blender with a new scene and now all of a sudden the menu appears.

@jdent02  that's weird. If it happens again and you have a way of reproducing it, let us know.


Fixed indentation of nested lists

Only one file seems to have been affected, namely source/providers/create/index.html.md
It appears that RedCarpet (the Ruby Markdown library in use, which is actually written in C) doesn't properly support nested lists.  If we indent them with four spaces per level, instead of two, it seems to work around this problem, at least for supporting three levels instead of only two.  So, that's what I've done here.
Signed-off-by: Dan Hunsaker<EMAIL_ADDRESS>

Thanks @danhunsaker!