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

Added custom task (pull cube with a hook tool) with motion planner solution #641

Open
wants to merge 32 commits into
base: main
Choose a base branch
from

Conversation

Viswesh-N
Copy link

No description provided.


qpos[:, -2:] = 0.04
self.agent.robot.set_qpos(qpos)
self.agent.robot.set_pose(sapien.Pose([-0.615, 0, 0]))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we initializing the robot here? The scene builder handles that already

tcp_pose=self.agent.tcp.pose.raw_pose,
cube_pose=self.cube.pose.raw_pose,
tool_pose=self.l_shape_tool.pose.raw_pose,
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following the setup of other envs (e.g. push cube), can you ensure the ground truth info (tool pose, cube pose) are only provided if the observation is state based

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is still not resolved. cube pose and tool pose are always included

self, obs: Any, action: torch.Tensor, info: Dict
):
max_reward = 13.0 # 10 + 1 + 1 + 1
return self.compute_dense_reward(obs=obs, action=action, info=info) / max_reward
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have you tested the reward function with PPO? If so can you add an example script to examples/baselines/ppo/examples.sh that works?

envs = gym.make(args.env_id, num_envs=args.num_envs if not args.evaluate else 1, **env_kwargs)
eval_envs = gym.make(args.env_id, num_envs=args.num_eval_envs, reconfiguration_freq=args.reconfiguration_freq, **env_kwargs)
envs = gym.make(args.env_id, num_envs=args.num_envs if not args.evaluate else 1, **env_kwargs, reward_mode = "dense")
eval_envs = gym.make(args.env_id, num_envs=args.num_eval_envs, reward_mode = "dense", reconfiguration_freq=args.reconfiguration_freq, **env_kwargs)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should not be changed

@@ -20,7 +20,7 @@
import sapien


@register_env("PullCubeTool-v1", max_episode_steps=100)
@register_env(uid="PullCubeTool-v1", max_episode_steps=100)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to add uid here. other code doesn't do that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make sure to remove all your own files here

tcp_pose=self.agent.tcp.pose.raw_pose,
cube_pose=self.cube.pose.raw_pose,
tool_pose=self.l_shape_tool.pose.raw_pose,
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is still not resolved. cube pose and tool pose are always included

@Viswesh-N Viswesh-N changed the title Added custom task (pull cube with a hook tool) Added custom task (pull cube with a hook tool) with motion planner solution Oct 26, 2024
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

Successfully merging this pull request may close these issues.

2 participants