sim2bot.RobotState¶
RobotState
dataclass
¶
Latest complete telemetry packet for one robot.
Joint quantities use the command order announced by
RobotInfo.
TCP quantities are expressed in the world frame. Derivatives are unsmoothed;
any smoothing selected in the GUI is display-only.
Attributes:
-
robot(int) –Current scene robot index.
-
id(str) –Robot scene identity.
-
name(str) –Human-readable robot name.
-
dof(int) –Number of reported arm joints.
-
t(float) –MuJoCo simulation time in seconds.
-
q(list[float]) –Joint positions in radians.
-
target(list[float]) –Latest joint-position targets in radians.
-
qd(list[float]) –Joint velocities in radians per second.
-
qdd(list[float]) –Joint accelerations in radians per second squared.
-
qddd(list[float]) –Joint jerk in radians per second cubed.
-
tcp(list[float]) –TCP world position
[x, y, z]in metres. -
tcp_orientation(list[float]) –TCP world quaternion
[x, y, z, w]. -
tcp_linear_velocity(list[float]) –World-frame linear velocity in metres per second.
-
tcp_angular_velocity(list[float]) –World-frame angular velocity in radians per second.
-
tcp_linear_acceleration(list[float]) –Linear acceleration in metres per second squared.
-
tcp_angular_acceleration(list[float]) –Angular acceleration in radians per second squared.
-
tcp_linear_jerk(list[float]) –Linear jerk in metres per second cubed.
-
tcp_angular_jerk(list[float]) –Angular jerk in radians per second cubed.
-
gripper(Optional[float]) –Commanded opening fraction from 0 closed to 1 open, if present.
-
sensors(list[dict]) –Authored sensor readings associated with this robot packet.
-
room_devices(list[dict]) –Scene door/window states, currently carried by robot 0.
-
capture_ts(Optional[float]) –Unix capture timestamp for the newest packet sample.
-
samples(list[dict]) –Physics-substep
{t, q, qd}samples since the prior packet.
Source code in sim2bot/client.py
193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 | |
Practical examples¶
Examples use objects discovered from the current scene rather than hard-coded robot metadata.
Read joint derivatives
Guidance¶
Usage tip
GUI derivative smoothing is display-only; these SDK values remain unsmoothed.