petercorke / petercorke/robotics-toolbox-python

None value with variable "qd" and "qdd" in function "mstraj" return

Open
#497 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C++
Stars
3.5k
Forks
624
Avg merge
2d 4h
Merged PRs (30d)
53

Description

Describe the bug
I applied the function "mstraj" in my code,

Version information
Installation from Conda channel "conda-forge"

To Reproduce
The python code is below:

q_start = np.array([0, 0, 0, 0, 0, 0])
q_via1 = np.array([0.5, -0.5, 0.2, 0, 0, 0])
q_via2 = np.array([1.0, 0.5, 0.9, 0.5, -0.2, 0])
q_end = np.array([1.5, 0, 0, 0, 0, 0])
waypoints = np.array([q_start, q_via1, q_via2, q_end])

dt = 0.02
t_acc = 0.5
q_vel = 2

traj = rtb.mstraj(waypoints, dt=dt, tacc=t_acc, qdmax=q_vel)

# None in variable "qd" and "qdd"
print(traj.qd)
print(traj.qdd)

The output of the code:

None
None

Expected behavior
I expected the meaningful value of varibale "qd" and "qdd" but returns "None".

Screenshots

Environment (please complete the following information):

  • Linux (Ubuntu 22.04).
  • python==3.11.11

Additional context

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the rtb.mstraj entry point using the supplied waypoint example and inspect how the returned trajectory exposes qd and qdd. Compare the documented or expected trajectory outputs with the reproduced None values, then add a regression test showing the intended values are returned.

Written by the indexing model from the issue text.

Assessment

Tech stack
numpy, python
Domain
robotics
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.