Rospython script crashing/unable to downgrade

Create issue
Issue #340 invalid
David Jeang created an issue

I have a launch file which uses a python script for my simulation, it launches fine, however when I try to implement any of the functions in the simulation, the script continues to crash.

Traceback (most recent call last):
  File "/home/david/DRC-Scratch-Repo/qual_task_1_bdi/scripts/qt1.py", line 674, in <module>
    teleop.run()
  File "/home/david/DRC-Scratch-Repo/qual_task_1_bdi/scripts/qt1.py", line 112, in run
    self.process_key(ch)
  File "/home/david/DRC-Scratch-Repo/qual_task_1_bdi/scripts/qt1.py", line 631, in process_key
    self.process_movement(ch)
  File "/home/david/DRC-Scratch-Repo/qual_task_1_bdi/scripts/qt1.py", line 558, in process_movement
    self.twist(dir["forward"], dir["lateral"], dir["turn"])
  File "/home/david/DRC-Scratch-Repo/qual_task_1_bdi/scripts/qt1.py", line 532, in twist
    walk_msg.walk_params.step_data[x-1] = step
AttributeError: 'AtlasBehaviorWalkParams' object has no attribute 'step_data'
[walking_actionlib_client-2] process has died [pid 9520, exit code 1, cmd /home/david/DRC-Scratch-Repo/qual_task_1_bdi/scripts/qt1.py __name:=walking_actionlib_client __log:=/home/david/.ros/log/a6c0c5f8-f40b-11e2-9a81-a0b3cc4f7a9c/walking_actionlib_client-2.log].
log file: /home/david/.ros/log/a6c0c5f8-f40b-11e2-9a81-a0b3cc4f7a9c/walking_actionlib_client-2*.log

My friend who has an older version of drcsim(1.7) says it runs fine. But when I tried to install the older version after removing my own I got this from this command.

sudo apt-get install drcsim=1.7

E: version 1.7 for drcsim was not found.

So my issue is this, how do I properly install an older version of drcsim, or how can I modify the script to keep it from crashing?

Attached is the script and launch file I try to run through the command: roslaunch qual_task_1_bdi qt1.launch

Where qual_task_1_bdi is the directory I keep the files under.

Comments (7)

  1. David Jeang reporter

    My friend isn't completely sure of the version his lab computers used after I told him this. That aside, the alternate solution would be adjusting the attached script to avoid crashing/killing the process. That may actually be a more progressive approach as it will improve this version's quality. The version I used was 2.6.

  2. Brian Gerkey

    The error that you reported:

    AttributeError: 'AtlasBehaviorWalkParams' object has no attribute 'step_data'
    

    was likely caused by trying to use the drcsim 2.5.x API with drcsim >= 2.6.0. As noted in the change log, the step_data field in AtlasBehaviorWalkParams was renamed to step_queue in drcsim 2.6.0.

    If you're going to use drcsim >= 2.6.0, you should update your code to match the new API. Alternatively, you could manually install an older version of drcsim, as @scpeters suggested.

    I looked through the qt1.py file that you uploaded and can't match it to the stack trace that you posted. Seem like you uploaded a different version of your code.

  3. Log in to comment