-
Notifications
You must be signed in to change notification settings - Fork 11
Add motor xacro macro; add base_footprint macro; fix base collision; fix wheel inertia; #9
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
base: master
Are you sure you want to change the base?
Conversation
- add origin to box_inertia and cylinder_inertia macro (used for e.g. castor wheel) - fix base link collision (removed offset error) - fix wheel inertia (rotate by pi/2) - add base footprint link and joint (common for mobile base robots)
- Incldue sensor macros - Include new gazebo macro - Use new base footprint macro - Rename back caster to rear caster
| <robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="diffbot"> | ||
|
|
||
| <xacro:property name="package_name" value="mobile_robot_description"/> | ||
| <xacro:property name="package_name" value="diffbot_description"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this parameter should be left as mobile_robot_description because is the name of the package and the path to find the files, isn't it?
| <child link="${prefix}_motor"/> | ||
| <origin xyz="${pos_x_joint} ${reflect* pos_y_joint} ${pos_z_joint}" rpy="0 ${-pi/2.0*(reflect - 1)} 0"/> | ||
| <axis xyz="0 1 0" rpy="0 0 0" /> | ||
| <!--origin xyz="${transX} ${reflect * (transY - wheel_width)} ${transZ}" rpy="${-pi/2.0*(reflect - 1)} 0 0" /--> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we delete these comments?
| <!--axis xyz="0 1 0" rpy="0 0 ${pi/2.0*(reflect - 1)}" /--> | ||
| </joint> | ||
|
|
||
| <!--gazebo reference="${fb}_${lr}_motor"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we gonna use this Gazebo color to the mesh?
| - origin [block]: origin, position and orientation of the link; | ||
| --> | ||
| <xacro:macro name="footprint" | ||
| params="wheel_props"> |
There was a problem hiding this comment.
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're using the wheel_props parameter right? Please, can we remove it and also update the xacro documentation?
| - l [float]: cylinder lenght (height); | ||
| --> | ||
| <xacro:macro name="cylinder_inertia" params="m r l"> | ||
| <xacro:macro name="cylinder_inertia" params="m r l o_xyz:='0.0 0.0 0.0' o_rpy:='0.0 0.0 0.0'"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, add the parameter documentation of the origin parameter.
| - z [float]: link dimension on the Z-axis; | ||
| --> | ||
| <xacro:macro name="box_inertia" params="m x y z"> | ||
| <xacro:macro name="box_inertia" params="m x y z o_xyz:='0.0 0.0 0.0' o_rpy:='0.0 0.0 0.0'"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, add the parameter documentation of the origin parameter.
Yes, I agree, I think we should remove this top-level layer. I'll open an issue to track this change 😉 |
I have added a xacro macro for motors in the
include/common_macros.urdf.xacro.If no mesh is provided in the new
config/motor.yamlthen a default box is used:Other changes I have made (or that could be made):
renamed material:
material_dark_greytodark_greyremove some whitespaces
For the
config/motor.yamlI removed the top levelmotor:like it is done inbase.yamlandfront_wheel.yaml. This makes the code shorter insidecommon_macros.urdf.xacro. Maybe this could be used for the other yaml files as well because the description is already in the dictionary name, e.g.motor_props,base_prop,wheel_props. I think havingbase_prop['base']...andwheel_props['wheel']...is a bit redundant. What do you think? This could be addressed in the future. Maybe there is a problem without the top level name?Updated the motor stl file to have its origin in the center (in Blender). This is done to match with the default box geometry.
added a colored stl wheel file:wheel-colored.stlfor diffbot, which should fix the color in Gazebo. Only now the color doesn't work in RViz (rims and tires will have the same color).Fix the wheel placement for diffbot
Add origin param to cylinder_inertia and box_inertia macros
add base footprint macro to
common_macros.urdf.xacroand use it indiffbot.urdf.xacroFix wheel inertia (rotation by pi/2)
Fix base collision offset (remove z offset)
TODOS: