nbv_sim/run_demo.py

22 lines
403 B
Python
Raw Normal View History

import rospy
from controllers import *
2021-03-12 14:55:42 +01:00
from robot_sim import *
from utils import *
gui = True
rospy.init_node("demo")
env = SimPandaEnv(gui)
2021-03-16 17:07:33 +01:00
env.controller = CartesianPoseController(env.arm, env.model, 60)
2021-03-12 14:55:42 +01:00
q, dq = env.arm.get_state()
2021-03-16 17:07:33 +01:00
x0 = env.model.pose(q)
2021-03-12 17:40:59 +01:00
marker = InteractiveMarkerWrapper("target", "panda_link0", x0)
while True:
2021-03-16 17:07:33 +01:00
env.controller.set_target(marker.pose)
env.forward(0.1)