In this passage I
want to recode the content of have to install the purosim in ubuntu 16.04 for
remeber.
use this web to
download the image of ubuntu 16.04
bash</p><p style="font-family:Calibri;font-size:0.917rem;">git clone <a href="https://github.com/ccappelle/pyrosim.git">https://github.com/ccappelle/pyrosim.git</a></p><p style="font-family:Calibri;font-size:0.917rem;">
Follow the github https://github.com/ccappelle/pyrosim to install the siftware

![计算机生成了可选文字: hut@ubuntu:—/Desktop/pyrosimSpipinstall-e Obtainingfile:///home/hut/Desktop/pyrostm Collectingnumpy(f「0伊py「ost伊二 :3.1.1) Downloadinghttps://ftIes.pythonhosted.org/packages/de/37/fe7db552f4507f 379d81dCb78e58e35333d8941757b1f664517d581b5553/nupy一1。15。4一(p27-cp27u-a nyltnuxlX8664.ht(13.8卜18) ]13。8習8100kB/s 133%] Installingcollectedpackages:numpy,pyrostm Runningsetup.pydevelopfo「py「ost伊 SuccessfulIyinstallednumpypyrostm Youa「eusingpipve「ston8.1.1,howeve「ve「ston18.1isavailable. YouShOUIdconside「upg「adtngviathe'pipinstall -upg「adepip'command. hui@ubuntu: 'Desktop](https://aclihui-blog-1253731526.cos.ap-beijing.myqcloud.com/wp-content/uploads/2019/02/35aad6082f9442dab9a4f3f8c6fa8402_clip_image00281cf6f89-94af-4916-ac40-6351c9ec74f2.png)

Now We can
start the first Demo
This should bring up an
OpenGL window displaying an empty, virtual world. The window will close on its
own after a few seconds.
来自 <https://github.com/ccappelle/pyrosim>
Notes
If you already
have pyrosim installed and want the latest update from the repository, change
into the modules root directory (contains setup.py) and pull
$ git pull
The C++ code is
likely to have changed so you have to recompile it by going int the simulator
directory and typing make
$ cd
pyrosim/simulator
$ make
The simulator
directory contains all of the C++ code used in pyrosim.
Next steps.
Now you can start
making robots here,
starting at step #3.
来自 <https://github.com/ccappelle/pyrosim>
In this part
I use the newest for I use the git clone to download the env.
# 3
We should
to make sure that
we have
the env of the numpy
We finish
the env.
Till now
we finsh the env
Next We
start to do the assgn 2
Follow
the title do
When the
code show as the follow we will see the
1 & 0.1 tools pause in the
Simulation.
Object.py
python</p><p style="font-family:Calibri;font-size:0.917rem;"> </p><p style="font-family:Calibri;font-size:0.917rem;">
When we
come to there ,we can use the ctrl + P to release the pause .And we can use the
ctrl + o to view the simulation motion step by step.
We can
use the mouse to adjust the position of the view we see. The left button is
change the view in 3D view and the right view change the view of far or near.
When we
change the original date like the follow
sim.send_cylinder( x=0
, y=0 , z=0.6 , length=1.0 , radius=0.1 )
来自 <https://www.reddit.com/r/ludobots/wiki/pyrosim/objects>
We will
see the follow image
Why the data is 0.6 because the half of the cylinder is 0.5 and the
radius is 0.1. so we should make the
z=0.6 ,which can make the cylinder and the half ball out of the coordinate(坐标) system.
2019-1-14 3:43 the process of this task has to the 15
prolem.
When we
change the location of the cylinder at this code
sim.send_cylinder( x=0
, y=0 , z=1.5 , length=1.0 , radius=0.1 )
来自 <https://www.reddit.com/r/ludobots/wiki/pyrosim/objects>
We will see the situation about
the cylinder .
And we can |
|
import pyrosim
sim=pyrosim.Simulator(play_paused=True,eval_time=1000)
whiteObject=sim.send_cylinder(x=0,y=0,z=0.6,length=1.0,radius=0.1)
print(whiteObject)
redObject=sim.send_cylinder(x=-0.2,y=0,z=0.6)
print(redObject)
sim.start()
In the
command
Change
the color of the next .
redObject=sim.send_cylinder(x=-0.2,y=0,z=0.6,r=1,
g=0, b=0)
Add the
rolation vectoylinder
Change
the red_cu
Now I
push myself to the next question
In order
to get the f pic
This is
so easy my code is in the next line
SO I finish the part of pyrosim/objects