Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should get_current_state_bounded be available in MoveGroupCommander, and why is it bounded? #1966

Closed
felixvd opened this issue Mar 23, 2020 · 3 comments
Labels

Comments

@felixvd
Copy link
Contributor

felixvd commented Mar 23, 2020

I wanted to use get_current_state in Python and came across this. Can someone do a quick sanity check?

This function getCurrentStateBoundedPython was introduced in the wrapper 4 years ago, but isn't used in move_group.py(link). I think this is an oversight.

Also, why is it bounded? Since there is no equivalent in the C++ MoveGroupInterface, I am a little confused.

If there's no objections I would submit a PR to connect this function in move_group.py, and maybe make it get_current_state instead of get_current_state_bounded, when I get around to it.

@felixvd felixvd added the bug label Mar 23, 2020
@felixvd
Copy link
Contributor Author

felixvd commented Mar 23, 2020

I tried to implement this, but when I call py_bindings_tools::serializeMsg, for some reason receive a string instead of a moveit_msgs.msg.RobotState object. Anyone have an idea what the problem might be? The very small changes are here.

Traceback (most recent call last):
  File "/home/panda/catkin_ws/src/osx_cgm_experiments/scripts/test_cgm_trajectory.py", line 158, in <module>
    velocity_scaling_factor=0.05, acceleration_scaling_factor=0.05)
  File "/home/panda/catkin_ws/src/moveit/moveit_commander/src/moveit_commander/move_group.py", line 602, in retime_trajectory
    ser_ref_state_in = conversions.msg_to_string(ref_state_in)
  File "/home/panda/catkin_ws/src/moveit/moveit_commander/src/moveit_commander/conversions.

I get that error when I try to call the retime_trajectory function, for which the get_current_state seems to be a prerequisite:

[...]
(success, trajectory, planning_time, error_code) = move_group.plan(goal_robot_state.joint_state)
robot_state = move_group.get_current_state()
trajectory = move_group.retime_trajectory(robot_state, trajectory, velocity_scaling_factor=0.05, acceleration_scaling_factor=0.05)

@PeterMitrano
Copy link
Contributor

I actually found this because I want to use get_current_state_bounded, and saw it wasn't fully implemented. Did you ever finish this?

@rhaschke
Copy link
Contributor

rhaschke commented Oct 8, 2020

The Python API by far isn't complete. If you are missing something, please file a corresponding PR.

@mamoll mamoll closed this as completed in 73416fb Oct 14, 2020
@tylerjw tylerjw mentioned this issue Oct 23, 2020
57 tasks
tylerjw pushed a commit to tylerjw/moveit that referenced this issue Oct 23, 2020
…veit#2356)

* implement get state and get state bounded

* add enforceBounds

Co-authored-by: Peter <pmitrano@storm20.04>
tylerjw pushed a commit to tylerjw/moveit that referenced this issue Oct 27, 2020
…veit#2356)

* implement get state and get state bounded

* add enforceBounds

Co-authored-by: Peter <pmitrano@storm20.04>
tylerjw pushed a commit that referenced this issue Nov 19, 2020
* implement get state and get state bounded

* add enforceBounds

Co-authored-by: Peter <pmitrano@storm20.04>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants