<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://pybullet.org/Bullet/phpBB3/app.php/feed/topic/13485" />

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2022-10-12T02:29:48+00:00</updated>

	<author><name><![CDATA[Real-Time Physics Simulation Forum]]></name></author>
	<id>https://pybullet.org/Bullet/phpBB3/app.php/feed/topic/13485</id>

		<entry>
		<author><name><![CDATA[atom]]></name></author>
		<updated>2022-10-12T02:29:48+00:00</updated>

		<published>2022-10-12T02:29:48+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=44138#p44138</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=44138#p44138"/>
		<title type="html"><![CDATA[Load Carrying Multirobot Simulation]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=44138#p44138"><![CDATA[
Hi, For our project, we are planning to do multirobot load carrying simulations <div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://pybullet.org/Bullet/phpBB3/download/file.php?id=1948" class="postimage" alt="2 robots carrying a load" onclick="viewableArea(this);" /></dt></dl></div>, I have found an excellent library that has a very simple holonomic point robot simulation <a href="https://github.com/maxspahn/gym_envs_urdf" class="postlink">https://github.com/maxspahn/gym_envs_urdf</a> in which I have two robots loaded which have a urdf associated to them and are loaded into the environment.<div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://pybullet.org/Bullet/phpBB3/download/file.php?id=1949" class="postimage" alt="multirobot example in pybullet" onclick="viewableArea(this);" /></dt></dl></div>To this simulation, I'm looking for ways in which I can add a load like the one shown in the figure.1 to this simulation, the load is attached to a fixed continuous joint which allows the robot to rotate in place with the load on the top. <br><br>To accomplish this would the urdf files have to modified or can this be done directly through the pybullet python API.  Any help is deeply appreciated. Thank you. <br><br>code for the simulation, to run this, the library has to installed. <div class="codebox"><p>Code: </p><pre><code>import gymimport numpy as npfrom urdfenvs.robots.tiago import TiagoRobotfrom urdfenvs.robots.generic_urdf import GenericUrdfReacherfrom urdfenvs.robots.prius import Prius# import sys# sys.path.append("/home/josyula/Programs/MAS_Project/gym_envs_urdf/")import pybulletdef run_multi_robot(n_steps=1000, render=False, obstacles=False, goal=False):    robots = [        GenericUrdfReacher(urdf="pointRobot.urdf", mode="vel"),        GenericUrdfReacher(urdf="pointRobot.urdf", mode="vel"),        # GenericUrdfReacher(urdf="ur5.urdf", mode="acc"),        # GenericUrdfReacher(urdf="ur5.urdf", mode="acc"),        # TiagoRobot(mode="vel"),        # Prius(mode="vel")    ]    env = gym.make(        "urdf-env-v0",        dt=0.01, robots=robots, render=render    )    n = env.n()    action = np.ones(n) * -0.2    pos0 = np.zeros(n)    pos0[1] = -0.0    base_pos = np.array([        [0.0, 1.0, 0.0],        [0.0, -1.0, 0.0],        [0.0, -2.0, 0.0]        ])    ob = env.reset(pos=pos0, base_pos=base_pos)    print(f"Initial observation : {ob}")    if goal:        from examples.scene_objects.goal import dynamicGoal        env.add_goal(dynamicGoal)    # if obstacles:    #     from examples.scene_objects.obstacles import dynamicSphereObst2    #     env.add_obstacle(dynamicSphereObst2)    pybullet.createVisualShape(pybullet.GEOM_BOX, halfExtents=[0.5, 0.5, 0.5])    print("Starting episode")    history = []    for _ in range(n_steps):        ob, _, _, _ = env.step(action)        history.append(ob)    env.close()    return history    #add load onto robotsif __name__ == "__main__":    run_multi_robot(render=True, obstacles=True, goal=True)</code></pre></div><p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=14446">atom</a> — Wed Oct 12, 2022 2:29 am</p><hr />
]]></content>
	</entry>
	</feed>
