I have just started to use RigidBodyDynamics. According to the tutorial, the proper way to set gravity seems m = Mechanism(world; gravity = SVector(0, 0, g)
. But when constructing a mechanism using parse_urdf
, what is the proper way to set gravity? My trial was like
m = parse_urdf(myurdf.urdf)
m.gravitational_acceleration = FreeVector3D(default_frame(m.tree.root), SVector(0, 0, -9.8))
but I guess mine is wrong and there is a better way.