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

Some Package Conflict and Solution #11

Open
XuXinhangNTU opened this issue Dec 4, 2024 · 12 comments
Open

Some Package Conflict and Solution #11

XuXinhangNTU opened this issue Dec 4, 2024 · 12 comments

Comments

@XuXinhangNTU
Copy link

First Thanks to your amazing works!
So I find some package version conflict that may cause crush after following the installation guidance.

For successfully run the Synchronous Simulation, in json.py the line 132
need change the
if (rgba == [0.5, 0.5, 0.5, 1.0]).all(): -> if jp.array_equal(rgba, jp.array([0.5, 0.5, 0.5, 1.0])):

to avoid the error

Processing rollout for visualization
Traceback (most recent call last):
  File "/usr/local/bin/dial-mpc", line 33, in <module>
    sys.exit(load_entry_point('dial-mpc', 'console_scripts', 'dial-mpc')())
  File "/root/dial-mpc/dial_mpc/core/dial_core.py", line 290, in main
    webpage = html.render(
  File "/usr/local/lib/python3.10/dist-packages/brax/io/html.py", line 76, in render
    return render_from_json(json.dumps(sys, states), height, colab, base_url)
  File "/usr/local/lib/python3.10/dist-packages/brax/io/json.py", line 132, in dumps
    if (rgba == [0.5, 0.5, 0.5, 1.0]).all():
  File "/usr/local/lib/python3.10/dist-packages/jax/_src/numpy/array_methods.py", line 577, in deferring_binary_op
    raise TypeError(f"unsupported operand type(s) for {opchar}: "
TypeError: unsupported operand type(s) for ==: 'ArrayImpl' and 'list'

For successfully run the Asynchronous Simulation

The mojuco package should be <=3.2.4 because the mojuco.mjv_makeConnector is deprecated in version 3.2.5
Also the mujoco-mjx should change version to the corresponding mujuco package

To avoid

Traceback (most recent call last):
  File "/usr/local/bin/dial-mpc-sim", line 33, in <module>
    sys.exit(load_entry_point('dial-mpc', 'console_scripts', 'dial-mpc-sim')())
  File "/root/dial-mpc/dial_mpc/deploy/dial_sim.py", line 347, in main
    mujoco_env.main_loop()
  File "/root/dial-mpc/dial_mpc/deploy/dial_sim.py", line 192, in main_loop
    mujoco.mjv_makeConnector(
AttributeError: module 'mujoco' has no attribute 'mjv_makeConnector'. Did you mean: 'mjv_connector'?

And I also contribute a docker, feel free to play!

docker pull xuxinhang007/dialmpc:v1

@huihuaNvidia2023
Copy link

Hi @XuXinhangNTU, thanks for your docker image and installation tips. It's very helpful. Do you mind share your docker file?

@XuXinhangNTU
Copy link
Author

Hi @huihuaNvidia2023 the docker image is public. Do you mean the .DockerFile ? I use docker commit to create the docker image, so I don’t prepare a DockerFile now. If you are interested in it, I can make it later.

@huihuaNvidia2023
Copy link

Hi @XuXinhangNTU, thank you for your reply!

Yes, I mean something like DockerFile.dial_mpc. It includes all the preparation, base image and required file/folder operations to create an image. Here is the link of an example.

@XuXinhangNTU
Copy link
Author

@huihuaNvidia2023 Okay, but this week is busy. I will do it later and when I finish, I will upload it. Thx!

@huihuaNvidia2023
Copy link

Thanks, not in a hurry. I got it working locally after I post the first question. To run in the Synchronous, I actually don't need to update the json.py as you mentioned.

@XuXinhangNTU
Copy link
Author

@ huihuaNvidia2023 It may be my docker environment Python version issue. Anyway, if you can let it run, that is good news. 😊

@HaoruXue
Copy link
Collaborator

ah thank you all for the discussion around the issue.

mjv_makeConnector is really just used for making the trajectory visualization. It should be fine to even just comment this out if people wants to use 3.2.5. But yeah I'll add a constraint to setup.py, since otherwise there are no benifits for switching to 3.2.5 (I guess we are all waiting on the mujoco-mjx's supposedly big updates comming up at this point 👀)

@XuXinhangNTU @huihuaNvidia2023 thanks for the discussion around the dockerfile too! Do you feel like opening a PR to include that in this upstream repo?

@HaoruXue
Copy link
Collaborator

HaoruXue commented Jan 15, 2025

@XuXinhangNTU @huihuaNvidia2023 any updates on whether you would be able to contribute a PR for the dockerfile? 😀

@huihuaNvidia2023
Copy link

Hi @HaoruXue, I didn't use any docker for my trial.

@XuXinhangNTU
Copy link
Author

@XuXinhangNTU @huihuaNvidia2023 any updates on whether you would be able to contribute a PR for the dockerfile? 😀

Hi, Haoru, I will pub it before CNY! Still busy these days.

@HaoruXue
Copy link
Collaborator

@XuXinhangNTU @huihuaNvidia2023 any updates on whether you would be able to contribute a PR for the dockerfile? 😀

Hi, Haoru, I will pub it before CNY! Still busy these days.

Sounds good! Looking forward to it.

@HaoruXue HaoruXue added enhancement New feature or request and removed enhancement New feature or request labels Jan 21, 2025
@XuXinhangNTU
Copy link
Author

@XuXinhangNTU @huihuaNvidia2023 any updates on whether you would be able to contribute a PR for the dockerfile? 😀

Hi, Haoru, I will pub it before CNY! Still busy these days.

Sounds good! Looking forward to it.

Hi Haoru this is the rp link https://github.com/XuXinhangNTU/dial-mpc-docker
I dont know whether this is what you want, if u wanna me add something or delete something, just tell me! @HaoruXue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants