Cannot determine tf from camera to robot

I have recently put a fisheye lens raspberry pi camera on my robot and done a calibration, now my robot doesn’t know where the camera is on the robot. I am running:
“roslaunch magni_demos simple_navigation.launch” on the robot
and
“roslaunch magni_viz view_nav.launch” on my workstation
I am seeing:
[ WARN] [1579187035.458022296]: “base_link” passed to lookupTransform argument source_frame does not exist.
[ERROR] [1579187035.458301929]: Cannot determine tf from camera to robot
every camera frame.
I checked that the date/time is properly synced
then I ran rosrun rqt_graph rqt_graph
and I am not seeing the motor node
then I ran roswtf and it says:
Found 2 warning(s).
Warnings are things that may be just fine, but are sometimes at fault

WARNING The following node subscriptions are unconnected:

  • /tf2_web_republisher:
    • /tf
    • /tf_static
    • /tf2_web_republisher/cancel
    • /tf2_web_republisher/goal
  • /joy_node:
    • /joy/set_feedback

WARNING These nodes have died:

  • magni_launch_core-1

So I tried stopping and starting magni-base.service (several times) and I am still getting the same things (no motor node and dead magni_launch_core-1)

Looks like something is dying or not starting properly.
What is the output of journalctl -u -b magni-base.service ?

ubuntu@ester:~$ journalctl -u -b magni-base.service
Failed to add match ‘magni-base.service’: Invalid argument

Sorry I got that command wrong from memory. It should be journalctl -b -u magni-base.service, the order of the flags was wrong.

in another terminal I ran:
roslaunch magni_bringup core.launch
and now it is working again, but if I reboot the robot I will probably need to manually run it again? I am also still having that little camera issue " sudo chmod 666 /dev/vcsm"

ubuntu@ester:~$ journalctl -b -u magni-base.service
– Logs begin at Thu 2016-02-11 08:28:00 PST, end at Thu 2020-01-16 08:35:58 PST. –
Jan 16 07:44:46 ester systemd[1]: Started magni-base.service.
Jan 16 07:44:46 ester magni-base[1209]: starting<14>Jan 16 07:44:46 ubuntu: magni-base: Using workspace setup file /home/ubuntu/catkin_ws/devel/setup.bash
Jan 16 07:44:47 ester magni-base[1209]: <14>Jan 16 07:44:47 ubuntu: magni-base: Launching ROS_HOSTNAME=ester.local, ROS_IP=, ROS_MASTER_URI=http://ester.local:11311, ROS_LOG_DIR=/tmp
Jan 16 07:44:47 ester magni-base[1209]: starting teleop/usr/sbin/magni-base: line 37: printfsleeping: command not found
Jan 16 07:44:49 ester magni-base[1209]: WARNING: Could not change permissions for folder [/tmp/292f14d6-3870-11ea-a21f-c48e8f7a7b39], make sure that the parent folder has correct permissions.
Jan 16 07:44:49 ester magni-base[1209]: /usr/bin/du: cannot read directory ‘/tmp/systemd-private-3e24b3cfa7ea438f90404b3501122cbe-systemd-hostnamed.service-GRu9jD’: Permission denied
Jan 16 07:44:57 ester magni-base[1209]: Traceback (most recent call last):
Jan 16 07:44:57 ester magni-base[1209]: File “/opt/ros/kinetic/lib/magni_bringup/launch_core.py”, line 41, in
Jan 16 07:44:57 ester magni-base[1209]: conf = get_conf()
Jan 16 07:44:57 ester magni-base[1209]: File “/opt/ros/kinetic/lib/magni_bringup/launch_core.py”, line 23, in get_conf
Jan 16 07:44:57 ester magni-base[1209]: conf = yaml.load(conf_file)
Jan 16 07:44:57 ester magni-base[1209]: File “/usr/lib/python2.7/dist-packages/yaml/init.py”, line 71, in load
Jan 16 07:44:57 ester magni-base[1209]: return loader.get_single_data()
Jan 16 07:44:57 ester magni-base[1209]: File “/usr/lib/python2.7/dist-packages/yaml/constructor.py”, line 37, in get_single_data
Jan 16 07:44:57 ester magni-base[1209]: node = self.get_single_node()
Jan 16 07:44:57 ester magni-base[1209]: File “/usr/lib/python2.7/dist-packages/yaml/composer.py”, line 36, in get_single_node
Jan 16 07:44:57 ester magni-base[1209]: document = self.compose_document()
Jan 16 07:44:57 ester magni-base[1209]: File “/usr/lib/python2.7/dist-packages/yaml/composer.py”, line 55, in compose_document
Jan 16 07:44:57 ester magni-base[1209]: node = self.compose_node(None, None)
Jan 16 07:44:57 ester magni-base[1209]: File “/usr/lib/python2.7/dist-packages/yaml/composer.py”, line 84, in compose_node
Jan 16 07:44:57 ester magni-base[1209]: node = self.compose_mapping_node(anchor)
Jan 16 07:44:57 ester magni-base[1209]: File “/usr/lib/python2.7/dist-packages/yaml/composer.py”, line 127, in compose_mapping_node
Jan 16 07:44:57 ester magni-base[1209]: while not self.check_event(MappingEndEvent):
Jan 16 07:44:57 ester magni-base[1209]: File “/usr/lib/python2.7/dist-packages/yaml/parser.py”, line 98, in check_event
Jan 16 07:44:57 ester magni-base[1209]: self.current_event = self.state()
Jan 16 07:44:57 ester magni-base[1209]: File “/usr/lib/python2.7/dist-packages/yaml/parser.py”, line 428, in parse_block_mapping_key
Jan 16 07:44:57 ester magni-base[1209]: if self.check_token(KeyToken):
Jan 16 07:44:57 ester magni-base[1209]: File “/usr/lib/python2.7/dist-packages/yaml/scanner.py”, line 115, in check_token
Jan 16 07:44:57 ester magni-base[1209]: while self.need_more_tokens():
Jan 16 07:44:57 ester magni-base[1209]: File “/usr/lib/python2.7/dist-packages/yaml/scanner.py”, line 149, in need_more_tokens
Jan 16 07:44:57 ester magni-base[1209]: self.stale_possible_simple_keys()
Jan 16 07:44:57 ester magni-base[1209]: File “/usr/lib/python2.7/dist-packages/yaml/scanner.py”, line 289, in stale_possible_simple_keys
Jan 16 07:44:57 ester magni-base[1209]: “could not found expected ‘:’”, self.get_mark())
Jan 16 07:44:57 ester magni-base[1209]: yaml.scanner.ScannerError: while scanning a simple key
Jan 16 07:44:57 ester magni-base[1209]: in “/etc/ubiquity/robot.yaml”, line 6, column 1
Jan 16 07:44:57 ester magni-base[1209]: could not found expected ‘:’
Jan 16 07:44:57 ester magni-base[1209]: in “/etc/ubiquity/robot.yaml”, line 7, column 1
Jan 16 07:44:57 ester magni-base[1209]: No handlers could be found for logger “roslaunch”
Jan 16 07:44:57 ester magni-base[1209]: [magni_launch_core-1] process has died [pid 1303, exit code 1, cmd /opt/ros/kinetic/lib/magni_bringup/launch_core.py __name:=magni_launch_core __log:=/tmp/292f14d6-
Jan 16 07:44:57 ester magni-base[1209]: log file: /tmp/292f14d6-3870-11ea-a21f-c48e8f7a7b39/magni_launch_core-1*.log
Jan 16 07:44:57 ester magni-base[1209]: INFO: cannot create a symlink to latest log directory: [Errno 17] File exists
Jan 16 07:44:58 ester magni-base[1209]: [ERROR] [1579189498.445172583]: a header of over a gigabyte was predicted in tcpros. that seems highly unlikely, so I’ll assume protocol synchronization is lost.
Jan 16 07:44:59 ester magni-base[1209]: [ERROR] [1579189499.181399465]: a header of over a gigabyte was predicted in tcpros. that seems highly unlikely, so I’ll assume protocol synchronization is lost.
Jan 16 07:45:07 ester magni-base[1209]: /usr/sbin/magni-base: line 39: printfwaking: command not found
Jan 16 07:45:07 ester magni-base[1209]: <14>Jan 16 07:45:07 ubuntu: magni-base: Started roslaunch as background process, PID 1254, ROS_LOG_DIR=/tmp
Jan 16 07:45:13 ester magni-base[1209]: [ERROR] [1579189513.860367277]: Couldn’t open joystick /dev/input/js0. Will retry every second.

the printf thing near the end was me trying to see if the magni base bash was completing… I’ll restore that to normal now… but the issue was happening with that unmodified.

Looks like there is a syntax error in /etc/ubiquity/robot.yaml

Can you post the contents of that?

# Robot Configuration
# sonars: None
sonars: 'pi_sonar_v1' # Un-comment to enable sonars


raspicam:{'position':'upward'}

added ` because '# were messing with format

Edit @rohbotics: fixed formatting of code block

Also I have not got any sonar data published
rostopic echo /ubiquitysonar/sonar0
doesn’t give output

I see the problem, YAML is whitespace sensitive. You need a space between raspicam: and its value.

Change your /etc/ubiquity/robot.yaml to the following (notice the added space):

# Robot Configuration
# sonars: None
sonars: 'pi_sonar_v1' # Un-comment to enable sonars


raspicam: {'position':'upward'}

ubuntu@ester:~$ sudo nano /etc/ubiquity/robot.yaml
[sudo] password for ubuntu:
ubuntu@ester:~$ sudo reboot
Connection to ester closed by remote host.
Connection to ester closed.
lorne@rosmaster:~$ ssh ubuntu@ester
ubuntu@ester’s password:
Welcome to Ubuntu 16.04.6 LTS (GNU/Linux 4.19.50-v7+ armv7l)

Welcome to the Ubiquity Robotics Raspberry Pi Image
Learn more: https://learn.ubiquityrobotics.com
Like our image? Support us on PayPal: tips@ubiquityrobotics.com

Wifi can be managed with pifi (pifi --help for more info)

5 packages can be updated.
5 updates are security updates.

Last login: Thu Jan 16 08:58:18 2020 from 192.168.11.69
ubuntu@ester:~$ journalctl -b -u magni-base.service
– Logs begin at Thu 2016-02-11 08:28:00 PST, end at Thu 2020-01-16 09:00:25 PST. –
Jan 16 08:59:39 ester systemd[1]: Started magni-base.service.
Jan 16 08:59:39 ester magni-base[1220]: starting<14>Jan 16 08:59:39 ubuntu: magni-base: Using workspace setup file /home/ubuntu/catkin_ws/devel/setup.bash
Jan 16 08:59:39 ester magni-base[1220]: <14>Jan 16 08:59:39 ubuntu: magni-base: Launching ROS_HOSTNAME=ester.local, ROS_IP=, ROS_MASTER_URI=http://ester.local:11311, ROS_LOG_DIR=/tmp
Jan 16 08:59:39 ester ubuntu[1267]: magni-base: Started roslaunch as background process, PID 1266, ROS_LOG_DIR=/tmp
Jan 16 08:59:39 ester magni-base[1220]: <14>Jan 16 08:59:39 ubuntu: magni-base: Started roslaunch as background process, PID 1266, ROS_LOG_DIR=/tmp
Jan 16 08:59:41 ester magni-base[1220]: WARNING: Could not change permissions for folder [/tmp/292f14d6-3870-11ea-a21f-c48e8f7a7b39], make sure that the parent folder has correct permissions.
Jan 16 08:59:41 ester magni-base[1220]: /usr/bin/du: cannot read directory ‘/tmp/systemd-private-557ac37d933849dfa8ce767fe7f71d54-systemd-hostnamed.service-GHM1mZ’: Permission denied
Jan 16 08:59:50 ester magni-base[1220]: INFO: cannot create a symlink to latest log directory: [Errno 17] File exists
Jan 16 08:59:51 ester magni-base[1220]: INFO: cannot create a symlink to latest log directory: [Errno 2] No such file or directory: ‘/tmp/latest’
Jan 16 08:59:56 ester magni-base[1220]: try: 1, refid: 68.69.221.61, correction: 2.290217400, skew: 10.658
Jan 16 08:59:57 ester magni-base[1220]: /usr/bin/du: cannot read directory ‘/tmp/systemd-private-557ac37d933849dfa8ce767fe7f71d54-systemd-hostnamed.service-GHM1mZ’: Permission denied
Jan 16 09:00:05 ester magni-base[1220]: [ERROR] [1579194005.460642669]: Couldn’t open joystick /dev/input/js0. Will retry every second.
ubuntu@ester:~$

looks better so far