init
This commit is contained in:
10
.gitignore
vendored
Normal file
10
.gitignore
vendored
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# Python-generated files
|
||||||
|
__pycache__/
|
||||||
|
*.py[oc]
|
||||||
|
build/
|
||||||
|
dist/
|
||||||
|
wheels/
|
||||||
|
*.egg-info
|
||||||
|
|
||||||
|
# Virtual environments
|
||||||
|
.venv
|
||||||
1
.python-version
Normal file
1
.python-version
Normal file
@@ -0,0 +1 @@
|
|||||||
|
3.13
|
||||||
6
main.py
Normal file
6
main.py
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
def main():
|
||||||
|
print("Hello from motrixsim-examples!")
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
119
origincar.urdf
Normal file
119
origincar.urdf
Normal file
@@ -0,0 +1,119 @@
|
|||||||
|
<?xml version="1.0" ?>
|
||||||
|
<!-- =================================================================================== -->
|
||||||
|
<!-- | This document was autogenerated by xacro from origincar.xacro | -->
|
||||||
|
<!-- | EDITING THIS FILE BY HAND IS NOT RECOMMENDED | -->
|
||||||
|
<!-- =================================================================================== -->
|
||||||
|
<robot name="mycar">
|
||||||
|
<link name="base_link">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<box size="0.276 0.164 0.08"/>
|
||||||
|
</geometry>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 0.07"/>
|
||||||
|
<material name="rgba(102,10,10,1)">
|
||||||
|
<color rgba="0.4 0.0392156862745098 0.0392156862745098 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
</link>
|
||||||
|
<link name="board_link">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<box size="0.200 0.164 0.06999999999999999"/>
|
||||||
|
</geometry>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 0.034999999999999996"/>
|
||||||
|
<material name="rgba(246,152,152,1)">
|
||||||
|
<color rgba="0.9647058823529412 0.596078431372549 0.596078431372549 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
</link>
|
||||||
|
<link name="camera">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<box size="0.015 0.045 0.03"/>
|
||||||
|
</geometry>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 0.015"/>
|
||||||
|
<material name="rgba(93,78,78,1)">
|
||||||
|
<color rgba="0.36470588235294116 0.3058823529411765 0.3058823529411765 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
</link>
|
||||||
|
<joint name="camera_joint" type="fixed">
|
||||||
|
<parent link="base_link"/>
|
||||||
|
<child link="camera"/>
|
||||||
|
<origin rpy="0 0 0" xyz="0.12050000000000001 0 0.11"/>
|
||||||
|
</joint>
|
||||||
|
<joint name="board_joint" type="fixed">
|
||||||
|
<parent link="base_link"/>
|
||||||
|
<child link="board_link"/>
|
||||||
|
<origin rpy="0 0 0" xyz="-0.038000000000000006 0 0.11"/>
|
||||||
|
<axis xyz="0 1 0"/>
|
||||||
|
</joint>
|
||||||
|
<link name="down_left_Link">
|
||||||
|
<visual>
|
||||||
|
<origin rpy="-1.5707963 0 0" xyz="0 0.0 0"/>
|
||||||
|
<geometry>
|
||||||
|
<cylinder length="0.025" radius="0.03"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="">
|
||||||
|
<color rgba="0.7450980392156863 0.12941176470588237 0.12941176470588237 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
</link>
|
||||||
|
<joint name="down_left_joint" type="continuous">
|
||||||
|
<parent link="base_link"/>
|
||||||
|
<child link="down_left_Link"/>
|
||||||
|
<origin rpy="0 0 0" xyz="-0.0841 0.0945 0.03"/>
|
||||||
|
<axis xyz="0 1 0"/>
|
||||||
|
</joint>
|
||||||
|
<link name="down_right_Link">
|
||||||
|
<visual>
|
||||||
|
<origin rpy="1.5707963 0 0" xyz="0 0.0 0"/>
|
||||||
|
<geometry>
|
||||||
|
<cylinder length="0.025" radius="0.03"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="">
|
||||||
|
<color rgba="0.7450980392156863 0.12941176470588237 0.12941176470588237 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
</link>
|
||||||
|
<joint name="down_right_joint" type="continuous">
|
||||||
|
<parent link="base_link"/>
|
||||||
|
<child link="down_right_Link"/>
|
||||||
|
<origin rpy="0 0 0" xyz="-0.0841 -0.0945 0.03"/>
|
||||||
|
<axis xyz="0 -1 0"/>
|
||||||
|
</joint>
|
||||||
|
<link name="up_left_Link">
|
||||||
|
<visual>
|
||||||
|
<origin rpy="-1.5707963 0 0" xyz="0 0.0 0"/>
|
||||||
|
<geometry>
|
||||||
|
<cylinder length="0.025" radius="0.03"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="">
|
||||||
|
<color rgba="0.7450980392156863 0.12941176470588237 0.12941176470588237 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
</link>
|
||||||
|
<joint name="up_left_joint" type="continuous">
|
||||||
|
<parent link="base_link"/>
|
||||||
|
<child link="up_left_Link"/>
|
||||||
|
<origin rpy="0 0 0" xyz="0.0841 0.0945 0.03"/>
|
||||||
|
<axis xyz="0 1 0"/>
|
||||||
|
</joint>
|
||||||
|
<link name="up_right_Link">
|
||||||
|
<visual>
|
||||||
|
<origin rpy="1.5707963 0 0" xyz="0 0.0 0"/>
|
||||||
|
<geometry>
|
||||||
|
<cylinder length="0.025" radius="0.03"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="">
|
||||||
|
<color rgba="0.7450980392156863 0.12941176470588237 0.12941176470588237 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
</link>
|
||||||
|
<joint name="up_right_joint" type="continuous">
|
||||||
|
<parent link="base_link"/>
|
||||||
|
<child link="up_right_Link"/>
|
||||||
|
<origin rpy="0 0 0" xyz="0.0841 -0.0945 0.03"/>
|
||||||
|
<axis xyz="0 -1 0"/>
|
||||||
|
</joint>
|
||||||
|
</robot>
|
||||||
135
origincar.xacro
Normal file
135
origincar.xacro
Normal file
@@ -0,0 +1,135 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<robot name="mycar" xmlns:xacro="http://wiki.ros.org/xacro">
|
||||||
|
|
||||||
|
<xacro:property name="PI" value="3.1415926"/>
|
||||||
|
<xacro:property name="Track" value="0.1682"/>
|
||||||
|
<xacro:property name="WheelBase" value="0.189"/>
|
||||||
|
<xacro:property name="WheelLen" value="0.025"/>
|
||||||
|
|
||||||
|
<link name="base_link">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<box size="0.276 ${WheelBase-WheelLen} 0.08"/>
|
||||||
|
</geometry>
|
||||||
|
<origin xyz="0 0 ${0.08/2+0.03}" rpy="0 0 0"/>
|
||||||
|
<material name="rgba(102,10,10,1)">
|
||||||
|
<color rgba="${102/255} ${10/255} ${10/255} 1" />
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
</link>
|
||||||
|
|
||||||
|
<link name="board_link">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<box size="0.200 ${WheelBase-WheelLen} ${0.150-0.08}"/>
|
||||||
|
</geometry>
|
||||||
|
<origin xyz="0 0 ${(0.150-0.08)/2}" rpy="0 0 0"/>
|
||||||
|
<material name="rgba(246,152,152,1)">
|
||||||
|
<color rgba="${246/255} ${152/255} ${152/255} 1" />
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
</link>
|
||||||
|
|
||||||
|
<link name="camera" >
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<box size="0.015 0.045 0.03"/>
|
||||||
|
</geometry>
|
||||||
|
<origin xyz="0 0 ${(0.03)/2}" rpy="0 0 0"/>
|
||||||
|
<material name="rgba(93,78,78,1)">
|
||||||
|
<color rgba="${93/255} ${78/255} ${78/255} 1" />
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
</link>
|
||||||
|
|
||||||
|
<joint name="camera_joint" type="fixed">
|
||||||
|
<parent link="base_link" />
|
||||||
|
<child link="camera" />
|
||||||
|
<origin xyz="${(0.276-0.015)/2-0.01} 0 ${0.08+0.03}" rpy="0 0 0" />
|
||||||
|
</joint>
|
||||||
|
|
||||||
|
|
||||||
|
<joint name="board_joint" type="fixed">
|
||||||
|
<parent link="base_link" />
|
||||||
|
<child link="board_link" />
|
||||||
|
<origin xyz="${-(0.276-0.2)/2} 0 ${0.08+0.03}" rpy="0 0 0" />
|
||||||
|
<axis xyz="0 1 0" />
|
||||||
|
</joint>
|
||||||
|
|
||||||
|
<link name="down_left_Link">
|
||||||
|
<visual>
|
||||||
|
<origin xyz="0 ${-WheelLen/2+0.025/2} 0" rpy="${-PI/2} 0 0" />
|
||||||
|
<geometry>
|
||||||
|
<cylinder radius="0.03" length="0.025" />
|
||||||
|
</geometry>
|
||||||
|
<material name="">
|
||||||
|
<color rgba="0.7450980392156863 0.12941176470588237 0.12941176470588237 1" />
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
</link>
|
||||||
|
|
||||||
|
<joint name="down_left_joint" type="continuous">
|
||||||
|
<parent link="base_link" />
|
||||||
|
<child link="down_left_Link" />
|
||||||
|
<origin xyz="${-Track/2} ${WheelBase/2} ${0.03}" rpy="0 0 0" />
|
||||||
|
<axis xyz="0 1 0" />
|
||||||
|
</joint>
|
||||||
|
|
||||||
|
<link name="down_right_Link">
|
||||||
|
<visual>
|
||||||
|
<origin xyz="0 ${WheelLen/2-0.025/2} 0" rpy="${PI/2} 0 0" />
|
||||||
|
<geometry>
|
||||||
|
<cylinder radius="0.03" length="0.025"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="">
|
||||||
|
<color rgba="0.7450980392156863 0.12941176470588237 0.12941176470588237 1" />
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
</link>
|
||||||
|
|
||||||
|
<joint name="down_right_joint" type="continuous">
|
||||||
|
<parent link="base_link" />
|
||||||
|
<child link="down_right_Link" />
|
||||||
|
<origin xyz="${-Track/2} ${-WheelBase/2} ${0.03}" rpy="0 0 0" />
|
||||||
|
<axis xyz="0 -1 0" />
|
||||||
|
</joint>
|
||||||
|
|
||||||
|
<link name="up_left_Link">
|
||||||
|
<visual>
|
||||||
|
<origin xyz="0 ${-WheelLen/2+0.025/2} 0" rpy="${-PI/2} 0 0" />
|
||||||
|
<geometry>
|
||||||
|
<cylinder radius="0.03" length="0.025"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="">
|
||||||
|
<color rgba="0.7450980392156863 0.12941176470588237 0.12941176470588237 1" />
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
</link>
|
||||||
|
|
||||||
|
<joint name="up_left_joint" type="continuous">
|
||||||
|
<parent link="base_link" />
|
||||||
|
<child link="up_left_Link" />
|
||||||
|
<origin xyz="${Track/2} ${WheelBase/2} ${0.03}" rpy="0 0 0" />
|
||||||
|
<axis xyz="0 1 0" />
|
||||||
|
</joint>
|
||||||
|
|
||||||
|
<link name="up_right_Link">
|
||||||
|
<visual>
|
||||||
|
<origin xyz="0 ${WheelLen/2-0.025/2} 0" rpy="${PI/2} 0 0" />
|
||||||
|
<geometry>
|
||||||
|
<cylinder radius="0.03" length="0.025"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="">
|
||||||
|
<color rgba="0.7450980392156863 0.12941176470588237 0.12941176470588237 1" />
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
</link>
|
||||||
|
|
||||||
|
<joint name="up_right_joint" type="continuous">
|
||||||
|
<parent link="base_link" />
|
||||||
|
<child link="up_right_Link" />
|
||||||
|
<origin xyz="${Track/2} ${-WheelBase/2} ${0.03}" rpy="0 0 0" />
|
||||||
|
<axis xyz="0 -1 0" />
|
||||||
|
</joint>
|
||||||
|
</robot>
|
||||||
7
pyproject.toml
Normal file
7
pyproject.toml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
[project]
|
||||||
|
name = "motrixsim-examples"
|
||||||
|
version = "0.1.0"
|
||||||
|
description = "Add your description here"
|
||||||
|
readme = "README.md"
|
||||||
|
requires-python = ">=3.13"
|
||||||
|
dependencies = []
|
||||||
Reference in New Issue
Block a user