Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove gripper from robot and change its dimensions #214

Merged
merged 14 commits into from
Nov 20, 2020

Conversation

RealOrangeOne
Copy link
Member

@RealOrangeOne RealOrangeOne commented Nov 9, 2020

Fixes #211
Fixes #193

Removing the gripper, making the robot shell slightly deeper and shorter should help with weight distribution.

I also moved the flag over where webots believes the robots actual position to be, which will help in visually seeing when a robot enters a territory.

image

image

Also shift around camera and front bump sensor so their locations make sense again
And move objects around to match new size
This will help in working out when it crosses boundaries
@RealOrangeOne RealOrangeOne changed the title Remove gripper from robot Remove gripper from robot and change its dimensions Nov 14, 2020
@Adimote
Copy link
Contributor

Adimote commented Nov 15, 2020

I'm getting quite a couple errors when I patch this in:

ERROR: 'C:/Users/abarr/Documents/sr/competition-simulator/competition-simulator/protos/Robot_Echo/SRRobot.proto':5:18: error: PROTO parameter 'controller' has no matching IS field.
ERROR: 'C:/Users/abarr/Documents/sr/competition-simulator/competition-simulator/protos/Robot_Echo/SRRobot.proto':7:18: error: PROTO parameter 'customData' has no matching IS field.

I suspect this is because you've defined 'controller' and 'customData' without using them?

Also I get the following warnings too:

WARNING: SRRobot (PROTO) > DEF bump_sensors Group > TouchSensor: Undefined inertia matrix: using the identity matrix. Please specify 'boundingObject' or 'inertiaMatrix' values.
WARNING: SRRobot (PROTO) > DEF bump_sensors Group > TouchSensor: Undefined inertia matrix: using the identity matrix. Please specify 'boundingObject' or 'inertiaMatrix' values.
WARNING: SRRobot (PROTO) > DEF body_group Transform > DEF BODY Group > DEF front_bar_top Solid: Mass is invalid because 'boundingObject' is not defined. Using default mass properties: mass = 1, inertia matrix = identity
WARNING: SRRobot (PROTO) > DEF body_group Transform > DEF BODY Group > DEF front_bar_top Solid: 'name' field value should be unique: 'solid(6)' already used by a sibling Solid node.
WARNING: SRRobot (PROTO) > DEF body_group Transform > DEF BODY Group > DEF front_bar_bottom Solid: 'name' field value should be unique: 'solid(6)' already used by a sibling Solid node.

@Adimote
Copy link
Contributor

Adimote commented Nov 15, 2020

Also it seems sr_controller is erroring with:

  File "sr_controller.py", line 256, in <module>
    main()
  File "sr_controller.py", line 232, in main
    robot_zone = get_robot_zone()
  File "sr_controller.py", line 58, in get_robot_zone
    return ROBOT_IDS_TO_CORNERS[os.environ['WEBOTS_ROBOT_ID']]
KeyError: '531'

and robot.py seems to still think there's a lifting motor.

Were we planning on fixing these in a different patch?

Comment on lines 1104 to 1107
controller IS controller
customData IS customData
}
} No newline at end of file
controller "sr_controller"
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we want these changes -- it looks like this is what's causing the errors which @Adimote notes in #214 (comment)

@RealOrangeOne
Copy link
Member Author

  • Woops, I forgot to change the API to remove the gripper controls, will fix
  • Yes the hard-coded IDs will likely change, but that's pretty trivial
  • I made most of the edits in webots itself, then transplanted them back into the proto file. I guess I need to review which bits changed and revert anything unrelated.

@PeterJCLaw
Copy link
Member

@RealOrangeOne I'm still seeing the ValueErrors from not having the right ids here.

@PeterJCLaw PeterJCLaw added this to the SR2021 Kickstart milestone Nov 15, 2020
@PeterJCLaw
Copy link
Member

Fixes #214

@RealOrangeOne is this right? That's the number of this PR.

Separately, I'm now getting Warning: "token bump sensor" device not found and then a bunch of ValueErrors.

@RealOrangeOne
Copy link
Member Author

is this right? That's the number of this PR.

Pesky off-by-21 errors!

token bump sensor

Ah damn, I haven't removed the microswitches from the code which were on the gripper.

@PeterJCLaw
Copy link
Member

Ah damn, I haven't removed the microswitches from the code which were on the gripper.

This will need a docs update.

@PeterJCLaw
Copy link
Member

Oh, and the image of the robot in the docs will need updating too.

@Adimote
Copy link
Contributor

Adimote commented Nov 16, 2020

Hey just writing the microgames, and I just discovered the wheel hitboxes stick out further than the bump switch, (see picture) meaning the bump switch won't necessarily trigger when you touch a wall.
image

@Adimote
Copy link
Contributor

Adimote commented Nov 16, 2020

actually now that I look at it closer, the hitbox for the robot body is too far forwards, see picture (the cube cannot get any closer in this picture)
image

@RealOrangeOne
Copy link
Member Author

@Adimote interesting find. I think i've fixed the hitbox, but i've also moved the wheels slightly further back (2cm) so they definitely don't stick out, so it's more obvious the switch will hit correctly.

Could you re-test and let me know if it's working correctly.

@PeterJCLaw
Copy link
Member

There's something weird with the rear caster here -- it seems to drop through the floor in some cases.

image

The code for that robot has it drive forwards at 50 power, then turn ~90 degrees to its right, then forwards again.

@PeterJCLaw
Copy link
Member

I'm also seeing a lot of:

WARNING: The current physics step could not be computed correctly. Your world may be too complex. If this problem persists, try simplifying your bounding object(s), reducing the number of joints, or reducing WorldInfo.basicTimeStep.

Not sure if that's this branch or other changes though.

@PeterJCLaw
Copy link
Member

I'm also seeing a lot of:

WARNING: The current physics step could not be computed correctly. Your world may be too complex. If this problem persists, try simplifying your bounding object(s), reducing the number of joints, or reducing WorldInfo.basicTimeStep.

Not sure if that's this branch or other changes though.

This doesn't reproduce on master. It may be related to the caster-through-floor issue.

@RealOrangeOne
Copy link
Member Author

I'll have a look at the changes I made to the caster, i'm hoping there's nothing too difficult.

Reverting all changes to it and simply shunting its Z-axis position might be a viable fix.

I think the `scale` was causing it to clip through the floor
@WillB97
Copy link
Contributor

WillB97 commented Nov 20, 2020

The caster is not going through the floor, what happens is the caster ends up by the front axle.
Arena2
It seems like the caster has a strange center of rotation.

@PeterJCLaw
Copy link
Member

Yup that caster position seems good now.

Copy link
Member

@PeterJCLaw PeterJCLaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aside from the uncertainties in the bump sensors (#223) this seems good. let's merge this and roll forwards.

@RealOrangeOne RealOrangeOne merged commit 7ecd60f into master Nov 20, 2020
@RealOrangeOne RealOrangeOne deleted the robot-simplify branch November 20, 2020 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build SR2021 robot Improve balance of the robot
4 participants