question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RobotModel.to_data()

See original GitHub issue

Feature Request

As a end-user, I want to serialize a RobotModel that I created programatically so that I can load it back later from file.

Details

I have a lot of trouble trying to pickle RobotModel, either using pickle or jsonPickle with no success. The decoded object doesn’t function anymore.

I created a little script to check if my returned object still works:

def LoadToolAndCheck(json_path):
    with open(json_path, 'r') as f:
        json_str = f.read()
        tool = jsonpickle.decode(json_str, keys=True)

    print (tool.__class__)
    for l in tool.links:
        print (l.__class__, l)

One specific scenario is when I create this RobotModel object in Rhino GH, and then I deserialize it in CPython, it will not function anymore.

Describe the solution you’d like I want a way to serialize RobotModel objects, either by jsonpickle or pickle or a ‘to_data’ type of method. I believe for the consistency with other compas object, a to_data() method is most appropriate.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
gonzalocasascommented, Jun 24, 2020

yes, it should have them. I will work on this soon in the short term.

0reactions
brgcodecommented, Jun 24, 2020

sorry forgot about this. in my opinion, RobotModel should definitely have from/to_data methods… if @gonzalocasas has the time i would prefer deferring this to him 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Robot - Webots documentation
The wb_robot_get_urdf function allows a robot controller to export URDF, an XML format for representing a robot model. A prefix for URDF link...
Read more >
moveit/moveit_config_data.h at master · ros-planning ... - GitHub
const std::string& getComment() const. {. return comment_;. }; ... Gazebo URDF robot model string ... @return pointer to data in datastructure.
Read more >
moveit_setup_assistant::MoveItConfigData Class Reference
robot_model::RobotModelConstPtr, getRobotModel (). Provide a shared kinematic model ... URDF robot model. ... Returns: pointer to data in datastructure.
Read more >
Mitsubishi Industrial Robot - CR750/CR751 Series Controller
protection of the data, press the function key corresponding to "DATA". ... The input signal is confirmed with a robot status variable (M_In(),...
Read more >
eV+ Language Reference Guide
ATTACH(). ;Reattach the robot. The following instruction sequence must be used ... exclusive access by an application program to data that is also...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found