Skip to content

Unity project file - pick and place. code error (PLEASE UPDATE the code changes) #430

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

Open
cheabdullahjz opened this issue Apr 24, 2025 · 1 comment

Comments

@cheabdullahjz
Copy link

Describe the bug
A clear and concise description of what the bug is.

filename = NiryoTrajectoryMsg.cs
Moveit.RobotTrajectoryMsg // (this give error)
i changed this to NiryoMoveit.NiryoTrajectoryMsg // (no error)

filename = TrajectoryPlanner.cs
foreach (var t in response.trajectories[poseIndex].joint_trajectory.points) // (this give error)

is there any update that is not reflected in the Unity Projet folder/file e.g.: the pick and place.
i am just following the instructions here - https://github.com/Unity-Technologies/Unity-Robotics-Hub/blob/main/tutorials/pick_and_place/2_ros_tcp.md

and, Unity console show errors after doing Menu -- Robotic -- Generate ROS messages

Thanks
Zul

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Console logs / stack traces
Please wrap in triple backticks (```) to make it easier to read.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots or videos to help explain your problem.

Environment (please complete the following information, where applicable):

  • Unity Version: [e.g. Unity 2020.2.0f1]
  • Unity machine OS + version: [e.g. Windows 10]
  • ROS machine OS + version: [e.g. Ubuntu 18.04, ROS Noetic]
  • ROS–Unity communication: [e.g. Docker]
  • Branch or version: [e.g. v0.2.0]

Additional context
Add any other context about the problem here.

@cheabdullahjz
Copy link
Author

Filename = TrajectoryPlanner.cs
//foreach (var t in response.trajectories[poseIndex].joint_trajectory.points)
foreach (var t in response.trajectories[poseIndex].trajectory)
{
//var jointPositions = t.positions;
var jointPositions = t.trajectory;
var result = jointPositions.Select(r => (float)r * Mathf.Rad2Deg).ToArray();

Severity Code Description Project File Line Suppression State
Error CS0030 Cannot convert type 'RosMessageTypes.NiryoMoveit.NiryoTrajectoryMsg' to 'float' Unity.Robotics.PickAndPlace F:\UnityTransfer\EXPERIMENTAL\UNITY_ROS\Unity-Robotics-Hub-main\tutorials\pick_and_place\PickAndPlaceProject\Assets\Scripts\TrajectoryPlanner.cs 184 Active

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

1 participant