Confused about Test ignis_move.py on the physical robot

Hello, I am a new to ROS. And I am trying to follow the course " Using Nvidia Jetson Nano with ROS". In the Unit 1, I followed the instructions below:

The most straightforward method you have to execute programs on your Ignisbot is the following:
* First, upload all the my_ignisbot_move_pkg to a git.
* Then, connect to your Physical IgnisBot. To do that, you have different methods detailed in the next section.
* Download the code into IgnisBot catkin_ws and compile. Take into account that you have to compile for python3 if you want to be sure nothing strange is happening. Although if you followed the setup guide, you shouldn't have any strange errors. If any error arises, please write your issue in here: <a href="https://get-help.robotigniteacademy.com/"> RobotIgniteAcademy Forum</a>

I was wandering:

  1. "all the my_ignisbot_move_pkg " means what?
    should it refers to the four python file(PCA9685.py ignisbot_wheels.py tailwag.py ignisbot_move.py) ?
  2. When upload it to git, how should I name the repository? If I name it freely, after git clone, I am not sure if the path can find the python files correctly.
  3. And I am confused why download(git clone) "all the my_ignisbot_move_pkg "into the directory( ~/catkin_ws/src) , rather than directory(/home/jetbot/catkin_ws/src/my_catkin_ws_python3/src/my_ignisbot_move_pkg)? Since the folder my_ignisbot_move_pkg already existed but contains 4 blank python files.
  4. Which directory to execute the command(touch launch/ignis_real_drivers.launch), If I execute it in the directory( ~/catkin_ws/src),It get error like this:
    touch: cannot touch 'launch/ignis_real_drivers.launch': No such file or directory

And if I execute it in the directory( jetbot@nano-4gb-jp45:~/catkin_ws/src/my_catkin_ws_python3/src/my_ignisbot_move_pkg) which already have the launch folder. I did not get error this try but in the later steps, I get error again like this:

I am trying to describe my question, if it is not very clear, please tell me.
I really missing in how to execute which command in which directory. Looking for your help.

Thanks a lot
Jinwei

Hi @Jinwei, welcome to the community!

I will separate your question in two parts (1., 2., 3.) and (4.).

  1. The instructions are here to help you upload your work to a repository. That way you can use it in another device just by cloning and compiling.
    1 - You should upload the whole package you created with catkin_create_pkg. This would be the directory my_ignisbot_move package which should be under your src directory.
    2 - You should name your repository the same as the package.
    3 - You will clone to catkin_ws/src because remember, you are to upload the git as the whole package.
  2. The command you are typing simply creates a new file. You should execute it inside the package for that command to make sense (because your package should contain a launch directory)

Thanks for your detailed answers. It worked! I really appreciate that your kind help.

I can go for next steps!

Hi @roalgoal, I have met new problem again. Could you please have a look at it? Just to for your information, I am using the Waveshare JetbotROS kit,here is the link:JetBot Professional Version ROS AI Kit B. And the image is Jetpack4.5.1. My local computer is Mac OS 10.15.1(very old)

After I uploaded the my_ignisbot_move_pkg under /home/jetbot/catkin_ws/src/my_catkin_ws_python3/srcto git, and clone it in ~/catkin_ws/src, I found some files are gone, not all the my_ignisbot_move_pkg are uploaded to git( not include launch folder, src folder)
.I was wandering if it’s OK to just copy the my_ignisbot_move_pkg to home/jetbot/catkin_ws/src to keep all the files.

So I try to copy the my_ignisbot_move_pkg under /home/jetbot/catkin_ws/src/my_catkin_ws_python3/src folder to ~/catkin_ws/src. Then I touch a launch file in the ~/catkin_ws/src/my_ignisbot_move_pkg/lauch,and do the following command:

ssh jetbot@IP_OF_YOU_IGNISBOT
cd ~/catkin_ws
source devel/setup.bash
rospack profile
roslaunch my_ignisbot_move_pkg ignis_real_drivers.launch

In the last step, I get error like this,

**jetbot@nano-4gb-jp45**:**~/catkin_ws**$ rospack profile

Full tree crawl took 0.643410 seconds.

Directories marked with (*) contain no manifest. You may

want to delete these directories.

To get just of list of directories without manifests,

re-run the profile with --zombie-only

-------------------------------------------------------------

0.533524 /opt/ros/melodic/share

0.014049 /home/jetbot/catkin_ws/src

0.002221 * /home/jetbot/catkin_ws/src/my_catkin_ws_python3

0.001509 * /home/jetbot/catkin_ws/src/my_catkin_ws_python3/src

0.000592 * /opt/ros/melodic/share/doc

0.000032 * /opt/ros/melodic/share/doc/liborocos-kdl

**jetbot@nano-4gb-jp45**:**~/catkin_ws**$ roslaunch my_ignisbot_move_pkg ignis_real_drivers.launch

Traceback (most recent call last):

File "/opt/ros/melodic/lib/python2.7/dist-packages/roslaunch/__init__.py", line 258, in main

args = rlutil.resolve_launch_arguments(args)

File "/opt/ros/melodic/lib/python2.7/dist-packages/roslaunch/rlutil.py", line 92, in resolve_launch_arguments

resolved = roslib.packages.find_resource(args[0], args[1])

File "/opt/ros/melodic/lib/python2.7/dist-packages/roslib/packages.py", line 528, in find_resource

source_path_to_packages=source_path_to_packages)

File "/opt/ros/melodic/lib/python2.7/dist-packages/catkin/find_in_workspaces.py", line 149, in find_in_workspaces

source_path_to_packages[source_path] = find_packages(source_path)

File "/usr/lib/python2.7/dist-packages/catkin_pkg/packages.py", line 96, in find_packages

raise RuntimeError('\n'.join(duplicates))

RuntimeError: Multiple packages found with the same name "my_ignisbot_move_pkg":

- my_catkin_ws_python3/src/my_ignisbot_move_pkg

- my_ignisbot_move_pkg

It seems there are two same-name my_ignisbot_move_pkg, How could I resolve this? should I delete the my_ignisbot_move_pkg under /home/jetbot/catkin_ws/src/my_catkin_ws_python3/src?

Looking for your kind help, Thanks a lot.

Jinwei

This is redundant, and is most likely why it’s giving you errors.

I recommend you take our ROS Basics in 5 Days Python before you do anything else with the jetson, that way you’ll get a sense of how you should organize a ROS workspace and things will make more sense.

You should only keep packages under your ~/catkin_ws/src

If you have repeated packages, then you need to delete them and compile again

Thanks for your advice, actually I am learning it right now hh, It’s a good entry-level tutorial, Thanks all of you providing such a course for us. I 'll try this Nano course later.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.