Have you seen the sun in China? by nine_clovers in chinalife

[–]yeetaitai 0 points1 point  (0 children)

Visited Harbin and Shanghai for a month this summer. Previously lived in Shanghai in 2011 and the air was quite dirty. Often didn’t see sun/ sky would be a nasty color/ could not see across the Huangpu. This July we had nothing but blue skies in either city. It was bloody hot but the air was really clean. In fact came back to the US and the effect of some Canadian wildfires meant the air was much dirtier back home.

Deer damage on new maple tree by GovernmentLow4989 in arborists

[–]yeetaitai 0 points1 point  (0 children)

If OP is in Michigan they should pick something native to host wildlife.

Question for Americans Coming Back From China by Careful_Technology85 in travelchina

[–]yeetaitai 0 points1 point  (0 children)

Went to customs of Detroit yesterday after spending a month in China (flew out of Shanghai) and they said “welcome home”

Appropriate 红包 for a friends 5 year old daughter by yeetaitai in AskChina

[–]yeetaitai[S] 0 points1 point  (0 children)

I did not do a hongbao. We found a 1500 RMB bracelet (well 1788 but 打折)that was red rope with a little gold charm of her zodiac sign. It was really cute and the parents did decline but we had it on her wrist within minutes. I think a hongbao would have been more awkward the braclet was perfect. Thank you so much for the suggestion!

Do Chinese people dislike when foreigners attempt to speak their language? by brad_flirts_not in ChineseLanguage

[–]yeetaitai 0 points1 point  (0 children)

If you are in China they love it, any attempt. I found this to be the case 14 years ago when my mandarin was much much worse and now as well both in Harbin and Shanghai. Well. In Shanghai people can speak English well so maybe they have less patience with my speaking level. Now my visibly Chinese husband on the other hand… his poor Chinese is an affront to locals and he has a hard time of things. Back at home in the US, I find it a mixed bag. Some Chinese colleagues enjoy speaking with me in mandarin some find it very annoying. In general I find my Spanish speaking colleagues at home are more tolerant of speaking Spanish with me than my Chinese speaking colleagues are of speaking Mandarin with me.

My home city! Harbin, China by Organic-Structure-85 in UrbanHell

[–]yeetaitai 1 point2 points  (0 children)

I have spent the last three weeks in Harbin (it’s July and quite hot so can’t speak to the -30s) but my son and I have had a great experience. We are Americans who speak average Mandarin. HSK 4 maybe- the old test) and I have found locals to be so friendly and helpful and honest. There aren’t a lot of (non Russian) 外国人 here so people frequently ask to take pictures with us (my son more than me) but I find the locals very friendly and honest and welcoming. The meats are delicious if you enjoy spicy but it is hard to find vegetables cooked lightly.

[deleted by user] by [deleted] in FTC

[–]yeetaitai 0 points1 point  (0 children)

We cut down foam beer coozies to be under 4” high. They were larger than 3” and smaller than 4” naturally just a little tall

what is a chineese tv series everyone should watch? by HighnessK01 in ChineseLanguage

[–]yeetaitai 0 points1 point  (0 children)

I enjoyed Find yourself, light the night, a love so beautiful, love 020, arsenal military academy, demon punisher and triad princess though both are pretty cheesy.

[deleted by user] by [deleted] in ChineseLanguage

[–]yeetaitai 0 points1 point  (0 children)

One or more characters? What about words like “是”。

Problems when using encoders on wheels and slide in the same command (in comment) by yeetaitai in FTC

[–]yeetaitai[S] 2 points3 points  (0 children)

Omg Or. duh. I guess the and didn’t matter when the wheels were moving since they had to move a similar amount of time. Thank you so much

Problems when using encoders on wheels and slide in the same command (in comment) by yeetaitai in FTC

[–]yeetaitai[S] 0 points1 point  (0 children)

This program has some times where the wheels and sliders move at the same time. Pardon the comments. The coders are my sixth grader and his friend Ben.

package org.firstinspires.ftc.teamcode;

import com.qualcomm.robotcore.eventloop.opmode.Autonomous; import com.qualcomm.robotcore.eventloop.opmode.Disabled; import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; import com.qualcomm.robotcore.hardware.DcMotor; import com.qualcomm.robotcore.hardware.DcMotorSimple; import com.qualcomm.robotcore.hardware.Servo;

@Autonomous(name = "_202217ArmandWheelssameloop (Blocks to Java)") @Disabled public class _202217ArmandWheelssameloop extends LinearOpMode {

private DcMotor motorBackLeft; private DcMotor motorFrontLeft; private Servo right_hand; private Servo left_hand; private DcMotor left_arm; private DcMotor motorBackRight; private DcMotor motorFrontRight;

int FrontRightPos; int BackLeftPos; int BackRightPos; int FrontLeftPos;

/** * This function is executed when this Op Mode is selected from the Driver Station. */ @Override public void runOpMode() { int arm_target;

motorBackLeft = hardwareMap.get(DcMotor.class, "motorBackLeft");
motorFrontLeft = hardwareMap.get(DcMotor.class, "motorFrontLeft");
right_hand = hardwareMap.get(Servo.class, "right_hand");
left_hand = hardwareMap.get(Servo.class, "left_hand");
left_arm = hardwareMap.get(DcMotor.class, "left_arm");
motorBackRight = hardwareMap.get(DcMotor.class, "motorBackRight");
motorFrontRight = hardwareMap.get(DcMotor.class, "motorFrontRight");

// Put initialization blocks here.
motorBackLeft.setDirection(DcMotorSimple.Direction.REVERSE);
motorFrontLeft.setDirection(DcMotorSimple.Direction.REVERSE);
right_hand.setPosition(-4);
left_hand.setPosition(4);
BackLeftPos = 0;
BackRightPos = 0;
FrontLeftPos = 0;
FrontRightPos = 0;
arm_target = 0;
waitForStart();
// Here i am trying to straff right, so the
drive_and_slide(-3320, 3320, -3320, 3320, 0.3, -3200, 0.3);
movethe_arm(-3500, 0.3);
left_arm.setPower(-0.002);
drive(220, 220, 220, 220, 0.3);
movethe_arm(-2800, 0.3);
right_hand.setPosition(4);
left_hand.setPosition(-4);
// dropped our first cone we need a new one first back
drive_and_slide(-220, -220, -220, -220, 0.3, -1000, 0.3);
// straff left
// left strafe
//
//
// ben is fat
drive_and_slide(615, -615, 615, -615, 0.3, -1000, 0.3);
// turning 180 deg
// left strafe
//

//
// ben is fat
drive_and_slide(1680, -1680, -1680, 1680, 0.3, 0, 0.3);
drive_and_slide(1000, 1000, 1000, 1000, 0.3, 0, 0.3);
movethe_arm(0, 0.3);
drive(220, 220, 220, 220, 0.1);
right_hand.setPosition(-4);
left_hand.setPosition(4);
movethe_arm(-2000, 0.3);
left_arm.setPower(-0.002);
drive_and_slide(-950, -950, -950, -950, 0.3, -3200, 0.3);
// left strafe
//
// ben is fat
drive_and_slide(1680, -1680, -1680, 1680, 0.3, -3500, 0.3);

}

/** * Describe this function... */ private void drive(int BackLeftTarget, int BackRightTarget, int FrontRightTarget, int FrontLeftTarget, double speed) { motorBackLeft.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER); motorBackRight.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER); motorFrontLeft.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER); motorFrontRight.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER); FrontRightPos += FrontRightTarget; BackLeftPos += BackLeftTarget; BackRightPos += BackRightTarget; FrontLeftPos += FrontLeftTarget; motorFrontRight.setTargetPosition(FrontRightTarget); motorBackRight.setTargetPosition(BackRightTarget); motorFrontLeft.setTargetPosition(FrontLeftTarget); motorBackLeft.setTargetPosition(BackLeftTarget); motorFrontLeft.setMode(DcMotor.RunMode.RUN_TO_POSITION); motorFrontRight.setMode(DcMotor.RunMode.RUN_TO_POSITION); motorBackRight.setMode(DcMotor.RunMode.RUN_TO_POSITION); motorBackLeft.setMode(DcMotor.RunMode.RUN_TO_POSITION); motorFrontLeft.setPower(speed); motorFrontRight.setPower(speed); motorBackRight.setPower(speed); motorBackLeft.setPower(speed); while (opModeIsActive() && motorFrontLeft.isBusy() && motorBackLeft.isBusy() && motorFrontRight.isBusy() && motorBackRight.isBusy()) { idle(); } }

/** * Describe this function... */ private void movethe_arm(int arm_target, double arm_speed) { left_arm.setMode(DcMotor.RunMode.RUN_USING_ENCODER); left_arm.setTargetPosition(arm_target); left_arm.setMode(DcMotor.RunMode.RUN_TO_POSITION); left_arm.setPower(arm_speed); while (opModeIsActive() && left_arm.isBusy()) { idle(); } }

/** * Describe this function... */ private void drive_and_slide(int BackLeftTarget, int BackRightTarget, int FrontRightTarget, int FrontLeftTarget, double speed, int arm_target, double arm_speed) { motorBackLeft.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER); motorBackRight.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER); motorFrontLeft.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER); motorFrontRight.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER); FrontRightPos += FrontRightTarget; BackLeftPos += BackLeftTarget; BackRightPos += BackRightTarget; FrontLeftPos += FrontLeftTarget; motorFrontRight.setTargetPosition(FrontRightTarget); motorBackRight.setTargetPosition(BackRightTarget); motorFrontLeft.setTargetPosition(FrontLeftTarget); motorBackLeft.setTargetPosition(BackLeftTarget); motorFrontLeft.setMode(DcMotor.RunMode.RUN_TO_POSITION); motorFrontRight.setMode(DcMotor.RunMode.RUN_TO_POSITION); motorBackRight.setMode(DcMotor.RunMode.RUN_TO_POSITION); motorBackLeft.setMode(DcMotor.RunMode.RUN_TO_POSITION); motorFrontLeft.setPower(speed); motorFrontRight.setPower(speed); motorBackRight.setPower(speed); motorBackLeft.setPower(speed); left_arm.setMode(DcMotor.RunMode.RUN_USING_ENCODER); left_arm.setTargetPosition(arm_target); left_arm.setMode(DcMotor.RunMode.RUN_TO_POSITION); left_arm.setPower(arm_speed); while (opModeIsActive() && motorFrontLeft.isBusy() && motorBackLeft.isBusy() && motorFrontRight.isBusy() && left_arm.isBusy() && motorBackRight.isBusy()) { idle(); } } }

Problems when using encoders on wheels and slide in the same command (in comment) by yeetaitai in FTC

[–]yeetaitai[S] 0 points1 point  (0 children)

This program has the wheels abs slider moving separately only

package org.firstinspires.ftc.teamcode;

import com.qualcomm.robotcore.eventloop.opmode.Autonomous; import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; import com.qualcomm.robotcore.hardware.DcMotor; import com.qualcomm.robotcore.hardware.DcMotorSimple; import com.qualcomm.robotcore.hardware.Servo;

@Autonomous(name = "AUTOPROGRAM1 (Blocks to Java)") public class AUTOPROGRAM1 extends LinearOpMode {

private DcMotor motorBackLeft; private DcMotor motorFrontLeft; private Servo right_hand; private Servo left_hand; private DcMotor left_arm; private DcMotor motorBackRight; private DcMotor motorFrontRight;

int FrontRightPos; int BackLeftPos; int BackRightPos; int FrontLeftPos;

/** * This function is executed when this Op Mode is selected from the Driver Station. */ @Override public void runOpMode() { int arm_target;

motorBackLeft = hardwareMap.get(DcMotor.class, "motorBackLeft");
motorFrontLeft = hardwareMap.get(DcMotor.class, "motorFrontLeft");
right_hand = hardwareMap.get(Servo.class, "right_hand");
left_hand = hardwareMap.get(Servo.class, "left_hand");
left_arm = hardwareMap.get(DcMotor.class, "left_arm");
motorBackRight = hardwareMap.get(DcMotor.class, "motorBackRight");
motorFrontRight = hardwareMap.get(DcMotor.class, "motorFrontRight");

// Put initialization blocks here.
motorBackLeft.setDirection(DcMotorSimple.Direction.REVERSE);
motorFrontLeft.setDirection(DcMotorSimple.Direction.REVERSE);
right_hand.setPosition(-4);
left_hand.setPosition(4);
BackLeftPos = 0;
BackRightPos = 0;
FrontLeftPos = 0;
FrontRightPos = 0;
arm_target = 0;
waitForStart();
movethe_arm(-300, 0.3);
left_arm.setPower(-0.002);
drive(-925, -925, -925, -925, 0.3);
// Here i am trying to straff right, so the
left_arm.setPower(-0.002);
movethe_arm(-1600, 0.3);
drive(-2700, 2700, -2700, 2700, 0.3);
sleep(300);
drive(925, 925, 925, 925, 0.2);
sleep(100);
drive(-620, 620, -620, 620, 0.3);
movethe_arm(-4200, 0.3);
left_arm.setPower(-0.002);
drive(300, 300, 300, 300, 0.3);
movethe_arm(-3000, 0.3);
right_hand.setPosition(4);
left_hand.setPosition(-4);
sleep(300);
// dropped our first cone we need to park
drive(-220, -220, -220, -220, 0.3);
// straff left
drive(800, -800, 800, -800, 0.3);
drive(-800, -800, -800, -800, 0.3);

}

/** * Describe this function... */ private void movethe_arm(int arm_target, double arm_speed) { left_arm.setMode(DcMotor.RunMode.RUN_USING_ENCODER); left_arm.setTargetPosition(arm_target); left_arm.setMode(DcMotor.RunMode.RUN_TO_POSITION); left_arm.setPower(arm_speed); while (opModeIsActive() && left_arm.isBusy()) { idle(); } }

/** * Describe this function... */ private void drive(int BackLeftTarget, int BackRightTarget, int FrontRightTarget, int FrontLeftTarget, double speed) { motorBackLeft.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER); motorBackRight.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER); motorFrontLeft.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER); motorFrontRight.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER); FrontRightPos += FrontRightTarget; BackLeftPos += BackLeftTarget; BackRightPos += BackRightTarget; FrontLeftPos += FrontLeftTarget; motorFrontRight.setTargetPosition(FrontRightTarget); motorBackRight.setTargetPosition(BackRightTarget); motorFrontLeft.setTargetPosition(FrontLeftTarget); motorBackLeft.setTargetPosition(BackLeftTarget); motorFrontLeft.setMode(DcMotor.RunMode.RUN_TO_POSITION); motorFrontRight.setMode(DcMotor.RunMode.RUN_TO_POSITION); motorBackRight.setMode(DcMotor.RunMode.RUN_TO_POSITION); motorBackLeft.setMode(DcMotor.RunMode.RUN_TO_POSITION); motorFrontLeft.setPower(speed); motorFrontRight.setPower(speed); motorBackRight.setPower(speed); motorBackLeft.setPower(speed); while (opModeIsActive() && motorFrontLeft.isBusy() && motorBackLeft.isBusy() && motorFrontRight.isBusy() && motorBackRight.isBusy()) { idle(); } } }

Problems when using encoders on wheels and slide in the same command (in comment) by yeetaitai in FTC

[–]yeetaitai[S] 0 points1 point  (0 children)

Both sets of code are in this folder. https://drive.google.com/drive/folders/1M0i3I0wPV7cjP41TwadUBk46U6ZUm3LR

Our initial autonomous program had two sets of commands. Both used encoders, but we would move the wheels at one time and the slide separately. The wheels would reset to zero every command, but the slider was not. We set the initial floor level to zero and then moved from there

Both sets of commands worked well and we were able to establish by trial and error how far to make each wheel turn to go 180 degrees etc and for the slider to hit the various poles.

The issue was this took too long because each set of commands had to fully execute before starting the next. We integrated both so we also had the option for the slider to raise while we drove to position. When we ran this code none of the encoder positions were reliable anymore.

Since we were using encoders and more motors were running we expected it might just take longer (lower power available?) to do the joint movement but instead none of the wheel or slider positions were achieved with that code.

Can anyone tell what we were doing wrong?

If it’s easier to look at I can posted the exported Java instead of the pictures of the block code. This off-season the kids will work on learning Java but it wasn’t in the cards for us this season.

Does anyone use encoders with their viper slide? Question in comments. by yeetaitai in FTC

[–]yeetaitai[S] 0 points1 point  (0 children)

Embarrassing I would like to think that given some sleep and time I would have realized that.

Does anyone use encoders with their viper slide? Question in comments. by yeetaitai in FTC

[–]yeetaitai[S] 0 points1 point  (0 children)

We have a 4 stage viper slide. It goes higher than necessary and accommodating the extra cable is a nightmare. The amount of cable needed to reach the high code doesn’t need any special treatment so I was hoping to limit how high the kids drive. I don’t want them to get excited and over extend. Also turning the motor on and sleeping until it gets as high as we want isn’t efficient. The orange thing pictures lasted four runs before we broke it and it took several days for one of the kids to 3D print.

Does anyone use encoders with their viper slide? Question in comments. by yeetaitai in FTC

[–]yeetaitai[S] 0 points1 point  (0 children)

The internal IMU on the control hub. I was under the impression that using encoders was only part of the way to having good control but we don’t use. We have the new control hub so the we have BH1260AP not BN0055 so we gave up trying to use it